Sunday, May 16, 2010

Re: Search using the Highlighted text as pattern

Panciz wrote:

> Hi,
>
> with the * and # command it is possible to search (foward and backward)
> for the word nearest the cursor, is there a way to use an entire block
> of highlighted text as pattern for the search.
> This is very usefull when you want to search and replace for a
> long stringi composed by multiple words.
>
> Davide

1) visual select your text
2) type y to yank
3) type /<CTRL-R>"<Enter> to search forward

See :help c_CTRL-R

-- Dominique

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: