Tim Johnson wrote:
Using vim 7.0 on kubuntu 7.04 (feisty fawn amd 64)

I've recently migrated from vim 6-something on slack 10.0
On my previous version and box, if I searched on an expression
in one file, closed it and opened another, "n" would continue
with the search.
Now, I get an "E35: No previous regular expression".

I've imported all of my previous settings, .vimrc etc...
so I don't know how to correct this.

Any help is welcome.
thanks
tim

If you close and reopen Vim, the last search pattern is remembered -- or not -- in the viminfo file. (It is one of the "registers".) The search history can also be saved. See ":help 'viminfo'".

By default (unless set otherwise in the vimrc), in 'compatible' mode 50 lines for each register, and 20 lines of history, are remembered.

If you mean in the same Vim session (e.g. by doing ":e bar.txt" after searching in foo.txt), then the search pattern should be remembered, unless there is something which explicitly clears it. An autocommand or a mapping, invoking ":let @/ = ''", could be such a something.


Best regards,
Tony.
--
The cry has been that when war is declared, all opposition should
therefore be hushed.  A sentiment more unworthy of a free country could
hardly be propagated.  If the doctrine be admitted, rulers have only to
declare war and they are screened at once from scrutiny ...  In war,
then, as in peace, assert the freedom of speech and of the press.
Cling to this as the bulwark of all our rights and privileges.
                -- William Ellery Channing

Reply via email to