On Tue, Nov 10, 2009 at 18:09, Reid Thompson <[email protected]> wrote:
>
> On Tue, 2009-11-10 at 08:24 -0800, Jason wrote:
>> 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
>>
>> thank you!
>>
>> >
>
> $ grep -v foo thefile > newfile
>

:g/foo/d

Regards

-- 
Étienne

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

Reply via email to