On 09/04/10 23:25, tomPorter wrote:
If I enter a regex search term, all occurrences of the matched items
in a window will be highlighted.

Is there a way to create a new window and populate it with only the
found items?

OR is there a variable that contains all items matching the regex
search term?

Example:

A colleague is working on a some large files where we use substitution
variables than start with '&&'.  Assume these are terminated by white
space, so are 'words' to vim.

He would like to extract just the tokens that start with '&&' and
populate a new window with those, so he can pull the tokens from two
separate files and see if all that occur in one occur in the other.

I was stumped at how to get this done.

Thanks!

Tom P.


There is no preexisting function or keybinding for that.

You can construct one, see
        :help :function
        :help search()
        :help quote/

Best regards,
Tony.
--
Cabbage, n.:
        A familiar kitchen-garden vegetable about as large and wise as
a man's head.
                -- Ambrose Bierce, "The Devil's Dictionary"

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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to