Wikia

Vim Tips Wiki

Watchlist Recent changes

Bookmark files

Redirected from VimTip1490

Tip 1490 Printable Monobook 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.

CommentsEdit

 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.


Pages on Vim Tips Wiki

Add a Page
1,586pages on
this wiki
Advertisement | Your ad here

Latest Photos

Add a Photo
71photos on this wiki
See more >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki