Not related to documentation fix, but you can use `setreg()' to avoid this
behavior.
By the way, while
let @/=""
clears the last search pattern, using `n' for some reason results in
E486: Pattern not found: ^M
Original message:
> 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?
--
Best,
Ben
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: