> I do a
>
> :/work/;/holidays/
>
> But may be I only want to find "holidays" which not
> such a huge gap after "work"...
>
> Is it possible to search for "holidays" right after work
> in less than a defineable distance or no "holidays" at all?
> Or is this to hard work? ;)
My first thought would be to limit the first match so that it
only finds instances where "holidays" is within N lines of "work":
:/work\%(.*\n\)\{,4}holidays/;/holidays/
where N=4 (ą1 for fence-posting errors on my part).
-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:
Post a Comment