On Feb 5, 12:25 pm, Javier Rojas <[email protected]> wrote: > On Sat, Feb 05, 2011 at 10:14:19AM -0800, Eduard wrote: > > ... > > to copy all matching lines, whole lines, containing hits. > > > I wonder if there's a way to do the same but instead of copying them > > to the clipboard, delete them. > > :g/pattern/d > > See :help :g >
I think this will not work for the second part claimed by the comment in the code posted: "The pattern may extend over multiple lines." For example, abc def ghi :g/abcc\ndef/d will delete only "abc", it will not delete "def". I'm not sure how important this is to the OP... -- 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
