On Wed, 26 Apr 2006, Halim, Salman wrote:
I use the extreme version:
vnoremap * "yy:let @/='\(' . substitute( escape( @y,
'$*^[]~\/.' ), '\_s\+', '\\_s\\+', 'g' ) . '\)':set hls
This escapes a lot of stuff, including replacing any whitespace with a
generic expression that includes newlines.
> -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: /\
> but I wo
> > I use the extreme version:
> >
> > vnoremap * "yy:let @/='\(' . substitute( escape( @y,
> > '$*^[]~\/.' ), '\_s\+', '\\_s\\+', 'g' ) . '\)':set hls
> >
> > This escapes a lot of stuff, including replacing any
> whitespace with a
> > generic expression that includes newlines. I like it
> b
On Wed, 26 Apr 2006, Halim, Salman wrote:
I use the extreme version:
vnoremap * "yy:let @/='\(' . substitute( escape( @y,
'$*^[]~\/.' ), '\_s\+', '\\_s\\+', 'g' ) . '\)':set hls
This escapes a lot of stuff, including replacing any whitespace with a
generic expression that includes newlines.
// :let @/[EMAIL PROTECTED]:set hls
Regards,
Salman.
> -Original Message-
> From: 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
On Tue, 25 Apr 2006, Suresh Govindachar wrote:
Hello,
By default, * searches for words: /\
but I would like it to search for strings: /stuff_below_cursor
One way is to use the following
map * yiw:let @/[EMAIL PROTECTED]
Is there a better way? ("/yiw didn't work.)
I found this
Suresh Govindachar wrote:
Hello,
By default, * searches for words: /\
but I would like it to search for strings: /stuff_below_cursor
One way is to use the following
map * yiw:let @/[EMAIL PROTECTED]
Is there a better way? ("/yiw didn't work.)
Thanks,
--Suresh
Hi,
g* w
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: /\
> but I would like it to search for strings: /stuff_below_cursor
> On
Hello,
By default, * searches for words: /\
but I would like it to search for strings: /stuff_below_cursor
One way is to use the following
map * yiw:let @/[EMAIL PROTECTED]
Is there a better way? ("/yiw didn't work.)
Thanks,
--Suresh