On Sat, Aug 14, 2010 at 05:42:21PM +0200, Tony Mechelynck wrote:
> On 14/08/10 17:13, James Vega wrote:
> >That fixes the error message, but not the issue with the other buffer
> >that I mentioned.
> >
> >   $ printf "foo\n">  mary
> >   $ vim -u NONE -i NONE existingfile
> >   :r mary
> >   :ls!
> >     1 %a + "existingfile"                 line 2
> >     2u#    "mary"                         line 1
> >
> >   $ vim -u NONE -i NONE -N
> >   :r mary
> >   :ls!
> >     1 %a + "[No Name]"                    line 2
> >     2u#    "mary"                         line 1
> >
> >This only happens in 'nocompatible' mode or if there is an existing
> >buffer loaded.
> >
> 
> I think it is intentional:
> 
> "If a filename is given with ":r", it becomes the alternate file."
> (insert.txt line 1846, sub |inserting-file|). You can't have an
> alternate file which doesn't appear in ":ls!". Note that the file is
> unlisted though (as shown by the "u" left of its name), an ordinary
> ":ls" won't show it.

Ah, I guess that makes sense.  The lack of 'f' in &cpo when using -N
explains, I think, why the behavior in my second example only happens in
'nocompatible' mode.

-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <[email protected]>

Attachment: signature.asc
Description: Digital signature

Raspunde prin e-mail lui