Why is vim not remembering my position in a file between runs?

you can ctrlo to jump through the 'jumps'.

you also add something to your .vimrc to jump to that cursor position automatically, read more at http://vim.wikia.com/wiki/Restore_cursor_to_file_position_in_previous_editing_session:

" VimTip 80: Restore cursor to file position in previous editing session
" for unix/linux/solaris
set viminfo='10,\"100,:20,%,n~/.viminfo

" only for windows [give some path to store the line number info]
"set viminfo='10,\"100,:20,%,nc:\\Winnt\\_viminfo
 au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif

In fact, I have observed the same behavior, but with a very different diagnosis.

When my /home/... partition became full, .viminfo was unable to be written, so those file positions were never stored. Once I cleared up some space, viminfo was positioning my editor again.

Tags:

Linux

Vim