Bug 40469 - viminfo is not being read
Summary: viminfo is not being read
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: vim
Version: 7.1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2001-05-14 04:45 UTC by Hal Burgiss
Modified: 2007-04-18 16:33 UTC (History)
0 users

Clone Of:
Last Closed: 2001-05-14 04:45:50 UTC

Attachments (Terms of Use)

Description Hal Burgiss 2001-05-14 04:45:26 UTC
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
set viminfo='25,h
[hal@feenix hal]$ strace -o /tmp/trace vim -g ~/.vimrc
[hal@feenix hal]$ grep viminfo /tmp/trace

Sanity check:

[hal@feenix hal]$ grep \.vimrc /tmp/trace |wc -l

How reproducible:

Steps to Reproduce:
1.open file, move cursor down
2.close file
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
it was 
closed. At least, this is how it worked on previous versions 
(vim 5.7).

Additional info:

Comment 1 Bernhard Rosenkraenzer 2001-05-14 10:14:44 UTC
Works here... Make sure you aren't turning the feature off in your ~/.vimrc.

Also, vim-minimal doesn't have this feature.

Comment 2 Hal Burgiss 2001-05-14 14:22:43 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.