Tuesday, July 26, 2011

Re: unexpected behavior of :let-@

Reply to message «Re: unexpected behavior of :let-@»,
sent 22:05:57 26 July 2011, Tuesday
by Benjamin R. Haskell:

It is a last substitute search pattern which causes this behavior. I forgot that
there are two «last search» patterns that vim remembers. Script to reproduce:
vim -u NONE -i NONE -s <(<<< $'/abc\n:s/-//e\n:let @/=""\nn')

Original message:
> On Tue, 26 Jul 2011, ZyX wrote:
> > Reply to message «unexpected behavior of :let-@»,
> > sent 20:36:08 26 July 2011, Tuesday
> > by Ben Fritz:
> >
> > By the way, while
> >
> > let @/=""
> >
> > clears the last search pattern, using `n' for some reason results in
> >
> > E486: Pattern not found: ^M
>
> Interesting. I get that under Gentoo. Under OpenSUSE I get:
> E35: No previous regular expression
>
> I also get E35 under Gentoo with -u NONE -i NONE -N
>
> Something weird with a default plugin?

No comments:

Post a Comment