Re: Cut-and-Paste with :g/pattern/d

2011-05-13 Thread Karthick Gururaj
On Wed, May 11, 2011 at 10:39 PM, Taylor Hedberg tmhedb...@gmail.com wrote: [snip] 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 = I personally use

Cut-and-Paste with :g/pattern/d

2011-05-11 Thread Waters, Bill
I often use :g/pattern/d to delete select lines. But I just realized that I don't know how to retrieve all of those lines after performing this command. If I do a 'p' after this, I only get the last line that was deleted. How can I paste all of the lines that were deleted? Thanks, Bill

Re: Cut-and-Paste with :g/pattern/d

2011-05-11 Thread ZyX
Reply to message «Cut-and-Paste with :g/pattern/d», sent 20:51:36 11 May 2011, Wednesday by Waters, Bill: qaq:g/pattern/d A First normal-mode command empties the `a' register, then «d A» will append lines to register a (note the case). Pure ex-mode version for use in scripts: :let

Re: Cut-and-Paste with :g/pattern/d

2011-05-11 Thread Tim Gray
On May 11, 2011 at 11:51 AM -0500, Waters, Bill wrote: I often use :g/pattern/d to delete select lines. But I just realized that I don't know how to retrieve all of those lines after performing this command. If I do a 'p' after this, I only get the last line that was deleted. How can I

Re: Cut-and-Paste with :g/pattern/d

2011-05-11 Thread Taylor Hedberg
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

RE: Cut-and-Paste with :g/pattern/d

2011-05-11 Thread Waters, Bill
: Wednesday, May 11, 2011 12:09 PM To: vim_use@googlegroups.com 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

Re: Cut-and-Paste with :g/pattern/d

2011-05-11 Thread Tim Gray
On May 11, 2011 at 11:51 AM -0500, Waters, Bill wrote: I often use :g/pattern/d to delete select lines. But I just realized that I don't know how to retrieve all of those lines after performing this command. If I do a 'p' after this, I only get the last line that was deleted. How can I