From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux 2.4.2-2smp i686; en-US; rv:0.9+)
Description of problem:
Vim is not saving/restoring the cursor position from ~/.viminfo
data. It always goes to the top of the file. I don't think it is
being read. I've tried on two machines, one stock, one slightly
modified built from src.rpm (7.1 src.rpm). Same results on both,
and same results with vim-X11 and enhanced-vim. Looking at .viminfo,
it is indeed being updated, just apparently not read when vim
opens a file.
[hal@feenix hal]$ vim +version +q! |grep viminfo
+vertsplit +virtualedit +visual +visualextra +viminfo +wildignore +wildmenu
[hal@feenix hal]$ grep viminfo .vimrc
[hal@feenix hal]$ strace -o /tmp/trace vim -g ~/.vimrc
[hal@feenix hal]$ grep viminfo /tmp/trace
[hal@feenix hal]$ grep \.vimrc /tmp/trace |wc -l
Steps to Reproduce:
1.open file, move cursor down
3.re-open file, and find cursor at top.
Actual Results: As expected.
Expected Results: Cursor should move to previous mark in file at the time
closed. At least, this is how it worked on previous versions
Works here... Make sure you aren't turning the feature off in your ~/.vimrc.
Also, vim-minimal doesn't have this feature.
Well, this clearly is not vim minimal. Anyway, through process of elimination
I found that this was caused by 'autocmd!' in .vimrc. Commenting this
out, solves problem. This line has been there through many versions of vim,
so not sure what the deal is with 6.0.