History
Article Edit this page Discussion

Bookmark files

From Vim Tips Wiki

(Redirected from VimTip1490)
Jump to: navigation, search

Tip 1490 Previous Next Created: January 25, 2007 Complexity: basic Author: Mosh Version: n/a


I read lots of files each day, and use file ~/.vims to remember the important ones.

function! MoshBookmark()
  redir >> ~/.vims
  echo
  echo strftime("%Y-%b-%d %a %H:%M")
  echo "cd ". $PWD
  echo "vim ". expand("%:p").':'.line('.')
  echo ' word='.expand("<cword>")
  echo ' cline='.getline('.')
  redir END
endfunction
:command! MoshBookmark :call MoshBookmark()

Vim's builtin viminfo loses bookmarks during multiple sessions of Vim, hence this solution is required.

[edit] Comments

 TO DO 
Explain when to use above function and what idea is.

To use the bookmark file, open it in Vim: vim ~/.vims

Press gF when cursor is on a filename.


Rate this article:

Share this article:

Hubs Highlights International Sites Wikia messages
Entertainment
Gaming
Cartoons & Comics
Science Fiction
Hobbies
Sports
See all...
Grand Theft Auto
Doctor Who
Legend of Zelda Wiki
Terminator Wiki
Everquest II Wiki
Mystery Science Theater 3000
German
Spanish
Chinese
Japanese
More...
Wikia is hiring for several open positions
Send this article to a friend
"Bookmark files"
 
 
Hi!

I thought you'd like this page from Wikia!

http://vim.wikia.com

Come check it out!
Send confirmation