when I open a file using vim, I'd like vim put the cursor to the place where I last edited so that it can save me lot of searching time to go back to the last edited place in order to, might be, continue the unfinished edit work from that place.
+1
A:
I think what you want is mkview and loadview. See :help :mkview :mkview outputs different information about your current window including:
- The scroll position and the cursor position in the file.
A common mapping for your .vimrc is:
au BufWinLeave *.py mkview
au BufWinEnter *.py silent loadview
to automatically run make and load views. Replace *.py accordingly.
ehc
2010-08-06 08:22:31