: Gerald Lai [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 26, 2006 1:30 AM
To: Suresh Govindachar
Cc: vim@vim.org
Subject: Re: Making * search for strings
On Tue, 25 Apr 2006, Suresh Govindachar wrote:
Hello,
By default, * searches for words: /\stuff_below_cursor\ but I
would
I use the extreme version:
vnoremap silent * yy:let @/='\(' . substitute( escape( @y,
'$*^[]~\/.' ), '\_s\+', '\\_s\\+', 'g' ) . '\)'cr:set hlscr
This escapes a lot of stuff, including replacing any
whitespace with a
generic expression that includes newlines. I like it
because
-Original Message-
From: Suresh Govindachar [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 26, 2006 1:00 AM
To: vim@vim.org
Subject: Making * search for strings
Hello,
By default, * searches for words: /\stuff_below_cursor\
but I would like it to search for strings
On Wed, 26 Apr 2006, Halim, Salman wrote:
I use the extreme version:
vnoremap silent * yy:let @/='\(' . substitute( escape( @y,
'$*^[]~\/.' ), '\_s\+', '\\_s\\+', 'g' ) . '\)'cr:set hlscr
This escapes a lot of stuff, including replacing any whitespace with a
generic expression that includes
Hello,
By default, * searches for words: /\stuff_below_cursor\
but I would like it to search for strings: /stuff_below_cursor
One way is to use the following
map * yiw:let @/[EMAIL PROTECTED]cr
Is there a better way? (/yiw didn't work.)
Thanks,
--Suresh
You could also change iskeyword to contain more characters, though
I suppose that could have side effects.
On 4/25/06, Suresh Govindachar [EMAIL PROTECTED] wrote:
Hello,
By default, * searches for words: /\stuff_below_cursor\
but I would like it to search for strings:
On Tue, 25 Apr 2006, Suresh Govindachar wrote:
Hello,
By default, * searches for words: /\stuff_below_cursor\
but I would like it to search for strings: /stuff_below_cursor
One way is to use the following
map * yiw:let @/[EMAIL PROTECTED]cr
Is there a better way? (/yiw didn't