I thought redir would do the job: :redir @+> :silent g/whatever/p :redir END
but that puts the whole lines on the clipboard. You'd have to paste them into a buffer then delete what you don't want. Tedious if your search text may occur several times on a line. A simple function can be used: function! Appclip (m) -- 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
