sponsor Vim development Vim logo Vim Book Ad

basic Tip #1490: Bookmark files

 tip karma   Rating 31/17, Viewed by 5122 

Read and edit this tip on the Vim tip wiki. The wiki may have a more recent version of this tip.

created:   January 25, 2007 19:02      complexity:   basic
author:   mosh      as of Vim:  

When you are reading 50 odd of files a day, I use ~/.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()                

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

 rate this tip  Life Changing Helpful Unfulfilling 

<< Spaces are my enemies.. | Call TortoiseSVN commands from within Vim >>

Additional Notes

Anonymous, January 27, 2007 1:56
How do you use the bookmark file?
using bookmark file, January 27, 2007 18:24
vim ~/.vims
Press  gF when cursor is on a filename.
If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo