A.J.Mechelynck wrote:
As has been repeatedly said this past week, this requires a viminfo
setting and an autocommand.
----
Maybe as has not been said. I have all that.
The autocommand is defined near line 70 of $VIMRUNTIME/vimrc_example.vim
so if you source the latter, you should have it.
I don't source example files by default. But my system has a /etc/vimrc
and it does have the lines below, which appear to be equivalent if not the
same as what is in the example. Perhaps vim no longer reads /etc/vimrc...?
" Only do this part when compiled with support for autocommands.
if has("autocmd")
" When editing a file, always jump to the last known cursor position.
" Don't do it when the position is invalid or when inside an event handler
" (happens when dropping a file on gvim).
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal g`\"" |
\ endif
endif " has("autocmd")
" /etc/vimrc ends here