RE: Making * search for strings

2006-04-26 Thread Gerald Lai
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.

RE: Making * search for strings

2006-04-26 Thread David Fishburn
> -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

RE: Making * search for strings

2006-04-26 Thread Halim, Salman
> > 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

RE: Making * search for strings

2006-04-26 Thread Gerald Lai
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.

RE: Making * search for strings

2006-04-26 Thread Halim, Salman
// :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

Re: Making * search for strings

2006-04-25 Thread Gerald Lai
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

Re: Making * search for strings

2006-04-25 Thread Linsong
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

Re: Making * search for strings

2006-04-25 Thread Eric Arnold
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

Making * search for strings

2006-04-25 Thread Suresh Govindachar
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