Adam wrote:
I found this function (CopyMatches) online a while ago from
here:
http://vim.wikia.com/wiki/Copy_the_search_results_into_clipboard
You reminded me that I have enhanced that script to behave more
usefully. It now defaults to copying from the whole file, and
copying to the clipboard,
Hi tomPorter!
On Fr, 09 Apr 2010, tomPorter wrote:
Is there a way to create a new window and populate it with only the
found items?
I would do it like this, which means
:redir = a redirect output into variable a
:g//print all lines matching the pattern
:redir
On 10 April 2010 12:29, Christian Brabandt wrote:
Hi tomPorter!
On Fr, 09 Apr 2010, tomPorter wrote:
Is there a way to create a new window and populate it
with only the found items?
You snipped the rest of the specification.
I would do it like this, which means
:redir = a
Hi Antony!
On Sa, 10 Apr 2010, Antony Scriven wrote:
That's not what the OP asked for. --Antony
Sorry, I misunderstood.
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
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 04/09/2010 04:25 PM, tomPorter wrote:
Is there a way to create a new window and populate it with only the
found items?
not readily (no single-step solution), but it can be hacked.
Start by cloning the document into a file you can rip up...either:
:%y yank the whole document
On 9 April 2010 22: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
On 04/09/2010 04:47 PM, Antony Scriven wrote:
For a quick a quick hack, try this.
:let tokens=[]
:%s/\S\+/\=add(tokens,submatch(0))/g
:undo
:new
:put=tokens
I like it :)
As a quick abuse of add(), the :undo can be obviated by making it
:let tokens=[]
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
On Fri, Apr 9, 2010 at 16:25, tomPorter tom.x.por...@gmail.com wrote:
OR is there a variable that contains all items matching the regex
search term
I found this function (CopyMatches) online a while ago from here:
http://vim.wikia.com/wiki/Copy_the_search_results_into_clipboard. Just
follow
10 matches
Mail list logo