Sunday, April 17, 2005

Have Vim remeber last cursor position

to have vim remeber the last cursor position of file edit, put in .vimrc:

set viminfo='10,\"100,:20,%,n~/.viminfo
au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif
Post a Comment