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

[Fwd: Re: No Previous Regular expression]

Expand Messages
  • A.J.Mechelynck
    Forward to list. Best regards, Tony. ... Subject: Re: No Previous Regular expression Date: Wed, 30 May 2007 20:02:36 -0700 From: drchip@campbellfamily.biz To:
    Message 1 of 1 , May 31, 2007
    • 0 Attachment
      Forward to list.

      Best regards,

      -------- Original Message --------
      Subject: Re: No Previous Regular expression
      Date: Wed, 30 May 2007 20:02:36 -0700
      From: drchip@...
      To: A.J.Mechelynck <antoine.mechelynck@...>
      References: <200705301740.28224.tim@...> <465E2A5D.7000303@...>

      Quoting "A.J.Mechelynck" <antoine.mechelynck@...>:

      > 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.
      > If you close and reopen Vim, the last search pattern is remembered -- or not
      > -- in the viminfo file. (It is one of the "registers".) [snip]

      I suspect that you edited a system file for your settings instead of a
      $HOME/.vimrc (or %HOME%\vimfiles). Vim system files are under vim6x/... and
      are provided by the vim installation process. When you upgraded to vim7.0 (the
      latest is vim7.1, BTW) any customizations you did under vim6x/ are no longer

      :echo $HOME

      to see where your home directory is... and edit a .vimrc file there. Put

      set nocp
      if version >= 600
      filetype plugin indent on
      set viminfo=!,'10,\"100,:20,%,nc:\\WINDOWSPATHHERE\\_viminfo

      set viminfo=!,'25,\"100,:20,%,n~/.viminfo
      (latter setting for linux/unix).

      And, while I'm at it, here's a snippet to restore cursor position:

      " Restore position in file: if previously edited (uses viminfo) {{{1
      " David Fishburn mod: use zv to open folds on current line, but after having
      read the modelines.
      augroup RestorePosition
      au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe "norm
      g`\""|else|exe "norm $"|endif|endif
      au BufWinEnter * norm! zv
      augroup END

      Chip Campbell
    Your message has been successfully submitted and would be delivered to recipients shortly.