Wednesday, April 6, 2011

Re: Path easy-search

On 04/06/2011 11:00 AM, Christian Brabandt wrote:
> Simply assign your search string directly to the search-register, e.g.
> if you have your search string in the Clipboard, use:
> :let @/=@+
> and press n to jump to the next occurence.
>
> Of course you can also assign it manually:
> :let @/='/path/with/many/slashes'

Or you can search backwards with "?":

?/path/to/wherever/with/slashes

If you want to change the direction of the search (rather than
using the somewhat awkwardly-inverted n/N commands), you can then
search forwards with no search criteria which will reuse the
previous pattern without the need to escape it.

-tim

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