> Hello everyone,
> some days ago I was wondering on the best way to search for full
> *NIX path (something like /path/to/file) in a file. The easier solution,
> a back-slash before each slash, is not that comfortable, especially if
> using the mouse for copy and paste.
> I looked around and summarized my results in:
>
> http://vim.wikia.com/wiki/Command_for_searching_expressions_%28paths%29_wich_include_backslashes
that link shows me an empty page ("This page needs content...")
> but I'm not sure that this is the best way to achieve the desired goal.
> Is there a best way?
>
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'
regards,
Christian
--
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:
Post a Comment