Re: replace string with deleted line

2009-12-06 Thread pansz
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 li

Re: replace string with deleted line

2009-11-10 Thread Jason
interestingly, I'm finding gvim might be faster and easier for manipulating data than a spreadsheet. On Nov 10, 10:14 am, Christian Brabandt wrote: > Hi Jason! > > On Di, 10 Nov 2009, Jason wrote: > > > I want go through the entire file and remove the lines with the words > > "foo". Not just rem

Re: replace string with deleted line

2009-11-10 Thread Jason
thank you everyone! That is pretty simple! I also appreciate the grep example. On Nov 10, 10:14 am, Christian Brabandt wrote: > Hi Jason! > > On Di, 10 Nov 2009, Jason wrote: > > > I want go through the entire file and remove the lines with the words > > "foo". Not just remove the word, but the

Re: replace string with deleted line

2009-11-10 Thread Christian Brabandt
Hi Jason! On Di, 10 Nov 2009, Jason wrote: > I want go through the entire file and remove the lines with the words > "foo". Not just remove the word, but the entire line. :g/foo/d regards, Christian -- • It's one of those rare "perfect" kernels. So if it doesn't happen to compile with

Re: replace string with deleted line

2009-11-10 Thread Tinou
On Tue, Nov 10, 2009 at 18:09, Reid Thompson 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

Re: replace string with deleted line

2009-11-10 Thread Tim Chase
> 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'd want :g/foo/d -tim --~--~-~--~~~---~--~~ Yo

Re: replace string with deleted line

2009-11-10 Thread Reid Thompson
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 t

replace string with deleted line

2009-11-10 Thread 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 thank you! --~--~-