--- David Thompson <[EMAIL PROTECTED]> wrote:
> --- Lev Lvovsky <[EMAIL PROTECTED]> wrote:
> > Is it possible to search for a string by selecting that string in  
> > visual mode?  Meaning, if I highlight something, and then want to  
> > search for that thing which is highlighted in the rest of the doc?
> 
> 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.   
> 
> See this tip,
> 
>   http://vim.sourceforge.net/tips/tip.php?tip_id=1

Btw, at the bottom of this tip, I added a comment about mapping
F10 to use hlsearch.  Here it is, it may do what you want,

  map <F10> :set invhls<CR>:let @/="<C-r><C-w>"<CR>/<BS>

Now use F10 key just like the * key, except F10 enables and
disables the "highlight search" mode.

See also,

  :help hlsearch

Regards,

David

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to