RE: Making * search for strings

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

RE: Making * search for strings

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

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: /\stuff_below_cursor\ but I would like it to search for strings

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

Making * search for strings

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

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: /\stuff_below_cursor\ but I would like it to search for strings:

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: /\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