>From :help visual-operators
Note that the ":vmap" command can be used to specifically map keys in Visual
mode. For example, if you would like the "/" command not to extend the Visual
area, but instead take the highlighted text and search for that: >
:vmap / y/<C-R>"<CR>
I would suggest not using the default yank register (it annoys me when things
clear it without warning me!) so try this instead (which uses the 'q' register
instead):
:vmap / "qy/<C-R>q<CR>
Then whenever you press / with something highlighted in visual mode, it will
get searched for!
Hope that helps!
Max
> -----Original Message-----
> From: Lev Lvovsky [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 17, 2006 4:47 PM
> To: David Thompson
> Cc: [email protected]
> Subject: Re: search visual block
>
>
> On Oct 17, 2006, at 4:36 PM, David Thompson wrote:
> > Why go to the trouble of highlighting it?
> >
> > Have you discovered the * key? Just press the * key while in
> > normal mode and vim searches for the word under the cursor.
>
> I have indeed, very useful, however this is for multiple words
> separated by spaces.
>
> -lev
>