Re: No Previous Regular expression

2007-05-31 Thread Yeti
On Thu, May 31, 2007 at 03:52:29AM +0200, A.J.Mechelynck wrote:
 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.) The search 
 history can also be saved. See :help 'viminfo'.

And since this is Ubuntu... .viminfo probably got owned by
root and therefore it is not writable, as was discussed in
the recent thread.

Yeti

--
http://gwyddion.net/


[Fwd: Re: No Previous Regular expression]

2007-05-31 Thread A.J.Mechelynck

Forward to list.

Best regards,
Tony.

 Original Message 
Subject: Re: No Previous Regular expression
Date: Wed, 30 May 2007 20:02:36 -0700
From: [EMAIL PROTECTED]
To: A.J.Mechelynck [EMAIL PROTECTED]
References: [EMAIL PROTECTED] [EMAIL PROTECTED]

Quoting A.J.Mechelynck [EMAIL PROTECTED]:


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.

 [snip]


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
effective.

Try:
  vim
  :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
endif
 set viminfo=!,'10,\100,:20,%,nc:\\WINDOWSPATHHERE\\_viminfo

or
  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!
 au BufReadPost * if line('\)  0|if line('\) = line($)|exe norm
g`\|else|exe norm $|endif|endif
 au BufWinEnter * norm! zv
augroup END


HTH,
Chip Campbell








Re: No Previous Regular expression

2007-05-31 Thread Tim Johnson
On Wednesday 30 May 2007, David Nečas wrote:
 
  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'.
  Yes, search history is being saved.
 And since this is Ubuntu... .viminfo probably got owned by
 root and therefore it is not writable, as was discussed in
 the recent thread.
  That's a gotcha - still haven't got used to this 'sudo' thing -
  viminfo *was* owned by root, so all is good now.
  Thanks folks, I appreciate it.
  tim 




Re: No Previous Regular expression

2007-05-31 Thread fREW

On 5/31/07, Tim Johnson [EMAIL PROTECTED] wrote:

On Wednesday 30 May 2007, David Nečas wrote:

  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'.
  Yes, search history is being saved.
 And since this is Ubuntu... .viminfo probably got owned by
 root and therefore it is not writable, as was discussed in
 the recent thread.
  That's a gotcha - still haven't got used to this 'sudo' thing -
  viminfo *was* owned by root, so all is good now.
  Thanks folks, I appreciate it.
  tim





If this list had a FAQ, it would probably contain this issue and the
large file issue (and maybe something about bottom posting :-P ) So
you are certainly not alone.

--
-fREW


Re: No Previous Regular expression

2007-05-31 Thread Tim Johnson
On Thursday 31 May 2007, fREW wrote:
 ...
 If this list had a FAQ, it would probably contain this issue and the
 large file issue (and maybe something about bottom posting :-P ) So
 you are certainly not alone.
1)What is the large file issue? (you can just point me to archives, if any)
thanks
tim



Re: No Previous Regular expression

2007-05-31 Thread fREW

On 5/31/07, Tim Johnson [EMAIL PROTECTED] wrote:

On Thursday 31 May 2007, fREW wrote:
 ...
 If this list had a FAQ, it would probably contain this issue and the
 large file issue (and maybe something about bottom posting :-P ) So
 you are certainly not alone.
1)What is the large file issue? (you can just point me to archives, if any)
thanks
tim




I don't really know where to look for the archives.  It's come up a
lot recently.  Basically if you have a big file make sure to set
undolevels=0 and turn off syntax highlighting.  Also turn of swap
files I think.  That's the main stuff.  And when I say big files I
mean multiple gigs.

--
-fREW


No Previous Regular expression

2007-05-30 Thread Tim Johnson
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 


Re: No Previous Regular expression

2007-05-30 Thread A.J.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.

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