In case other people stumble along this, here's the proper way to enable "last-position-jump" (as documented in the help):
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
No setting of 'viminfo' needed (and with unrelated, unnecessary options). No moving the cursor to the end of the first line when '" is past the end of the file.
2 comments:
works like a dream. thank you !
In case other people stumble along this, here's the proper way to enable "last-position-jump" (as documented in the help):
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
No setting of 'viminfo' needed (and with unrelated, unnecessary options). No moving the cursor to the end of the first line when '" is past the end of the file.
Post a Comment