On Fri, 6 Oct 2006 at 2:53pm, Fletcher Mattox wrote: > Hi, > > When I edit two files by typing ":e foo" and ":e #", vim remembers > my current location in each and kindly positions me there when > I revisit them. However, when I edit three or more files, vim forgets > where I was and always positions the cursor at the top of the file. > How do I get vim to remember where I was in an arbitrary number > of files? > > Thanks > Fletcher
My observation is that if you don't have 'hidden' option set, Vim will unload the buffer when it is hidden. And when you reopen the file using the :e command, it results in getting reloaded, and Vim discards the saved position (somehow this doesn't apply to :e#). A better way is to open existing buffers using :buf and :sbuf commands (which preseve the position) and use :edit only to load new buffers. The :buf commands also allow you to complete names from loaded buffers. -- HTH, Hari __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com