Loading ...
Sorry, an error occurred while loading the content.

Re: back from helpfile doesn't work anymore in 6.0 (bug?)

Expand Messages
  • Erik Warendorph
    ... Is tags really involved? I thought it just loaded the helpfile... (but I really don t know the insides of vim, so excuse my ... still gives the same
    Message 1 of 3 , Feb 27, 2002
    • 0 Attachment
      * * Erik Warendorph <erik.warendorph@...> [2002-02-27]:
      > > In vim 5.6, when I wanted to leave a vim running, I used to do the
      > > following to show only the help page:
      > >
      > > <F1> <C-W> <C-O> <C-L>
      > >
      > > Provided that I had set 'nohidden' and written all buffers to
      > > file, I could now open some or all of the same files in a second
      > > vim from somewhere else, without being bothered with warnings
      > > about swap files.
      > >
      > > When I wanted to continue using the first vim, I could press
      > >
      > > <C-^>
      > >
      > > and get back to the last edited file there.
      > >
      > > In vim 6.0, you can't use <C-^> to get back from a helpfile to the
      > > last edited file, you get the messsage:
      > >
      > > E23: No alternate file
      > >
      > > To me this looks like a bug (I see no reason for this to *not*
      > > work).

      * Bram Moolenaar <bram@...> [2002-02-27]:
      > You can see what happens: After pressing <F1>, ":ls" shows that the
      > other file doesn't get "#" (indicating it's the alternate file).
      > That's probably because Vim first loads the main help file before
      > jumping to the tag. I'll see if this can be fixed.

      Is tags really involved? I thought it just loaded the helpfile...
      (but I really don't know the insides of vim, so excuse my
      ignorance here). If I do:

      :h <CR> <C-W> <C-O> <C-L>

      or even:

      :view /usr/share/vim/vim60/doc/help.txt.gz <CR> <C-W> <C-O> <C-L>

      <C-^> still gives the same error message... (and of course ":ls"
      shows that no file has got the "#")

      > > A strange thing is that you can get from the helpfile to one of
      > > the "normal" buffers with :bn (which didn't work in vim 5.7) and
      > > then *back* to the helpfile with <C-^>, even though :ls doesn't
      > > always show the helpfile (it doesn't show it before *after* you've
      > > pressed <C-^> to go back (even stranger...)).
      > ":ls!" does show it. Help files are unlisted.

      Yeah, of course -- I had forgot about ":ls!".

      But the strange thing is that jumping from the normal file back to
      the helpfile with <C-^> makes ":ls" show the helpfile...

      Here's an example (I'm using ":only" instead of "<C-W> <C-O>" and
      ":e #" instead of <C-^> here, but the result seems to be the

      First do:

      $ touch foo

      Then do:

      $ vim foo
      :h | only | ls | q
      1 "foo" line 1

      Now, jumping back to foo before ":ls":

      $ vim foo
      :h | only | br | ls | q
      1 %a "foo" line 1

      And then, jumping back again to the helpfile with ":e #" (=

      $ vim foo
      :h | only | br | e # | ls | q
      1 "foo" line 1
      2 %a- "help.txt.gz" line 1

      It seems that ":ls" now suddenly shows the helpfile because we
      accessed it with "e #". That's strange... Or maybe it isn't --
      is the rule that if we access it with <C-^> or ":e #" this is
      "explicitly asking to load it" so therefore ":ls" will show it to

      - erik
    Your message has been successfully submitted and would be delivered to recipients shortly.