Jason 写道:
> I have a file that contains a bunch of lines with only the word "foo"
> on it.
> 
> I want go through the entire file and remove the lines with the words
> "foo". Not just remove the word, but the entire line.
> 
> How is this done in vim?
> 
> I tried :%s/foo//g
> 
> but it left the line
> 

you can just use :%2/foo\n//g for the trick. which is longer than 
:g/foo/d but is easier to remember.


-- 
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Reply via email to