Thanks! I use named registers regularly, but not in association with a command like this. I figured there was a straightforward/easy way like this to do it.
Bill -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Taylor Hedberg Sent: Wednesday, May 11, 2011 12:09 PM To: [email protected] Subject: Re: Cut-and-Paste with :g/<pattern>/d You can delete into a named register (rather than the default register) and append, rather than replace, its contents. For registers a-z, specifying them as A-Z (uppercase), means to append to the existing register contents. So the following: :g/<pattern>/d A would append each deleted line to register a, after which you could then paste all the deleted lines with: "ap Note that if there's already something in register a, it won't automatically be cleared before your global command executes, so you'll probably want to clear it first with: :let @a = "" -- 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 -- 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
