Return cursor to where you left off when editing a file
Just add the following two lines to your ~/.vimrc file,
set viminfo='10,\"100,:20,%,n~/.viminfo
au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif
[Click to add or edit comments])
Please prepend comments below including a date