On Sat, 7 Oct 2006 at 6:12pm, A.J.Mechelynck wrote:

> Yakov Lerner wrote:
> > Forwarding to the ist
> >
> > ---------- Forwarded message ----------
> > From: Fletcher Mattox <[EMAIL PROTECTED]>
> > Date: Oct 7, 2006 3:21 PM
> > Subject: Re: how to remember file offsets?
> > To: Yakov Lerner <[EMAIL PROTECTED]>
> >
> >
> >> On 10/6/06, Fletcher Mattox <[EMAIL PROTECTED]> 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?
> >>
> >> Check that you have option 'viminfo properly set
> >> (:help 'vimnifo') in your vimrc; and check that you have
> >> following in your vimrc:
> >>
> >>   autocmd BufReadPost *
> >>     \ if line("'\"") > 0 && line("'\"") <= line("$") |
> >>     \   exe "normal g`\"" |
> >>     \ endif
> >>
> >> Yakov
> >
> > Yakov,
> >
> > Perfect!  Thank you so much for spelling this out.  One of the other
> > list members
> > alluded to this solution, but I couldn't quite put it all together (I am
> > a new
> > vim user) until your email arrived.
> >
> > Thanks again,
> > Fletcher
> >
>
> Well, the solution to which I alluded includes this implicitly by having the
line
>
>       source $VIMRUNTIME/vimrc_example.vim
>
> near the top of your vimrc.
>
>
> Best regards,
> Tony.

In the vimrc_example.vim, there is a common on this and part of it says:

  " Don't do it when the position is invalid or when inside an event handler
  " (happens when dropping a file on gvim).

Any idea what it is exactly talking about? Is the "Don't do it" part
a comment on how the functionality of the autocommand or an instruction
to the user?

-- 
Thanks,
Hari

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to