Facebook Application

Bruce Easton bruce at stn.com
Wed Dec 16 19:23:49 PST 2009


Ken Cole wrote Wednesday, December 16, 2009 7:48 PM:
> 
> No :g means global in the file, every line
> 
> this command is:
> 
> :g/target/s/string1/string2/
> 
> globally find target and substitute for string1 string2
> 
> This will only do the substitute one per line unless there is 
> a trailing g for global in the line.

Yeah - I realize that now I really didn't want the trailing g 
since what I was searching for (to replace on all lines) was 
the first occurrence of 'html "1" :'. Unlikely that there 
would be more than one of that string anyway.

Bruce

> 
> On Thu, Dec 17, 2009 at 10:44 AM, Fairlight 
> <fairlite at fairlite.com> wrote:
> > You'll never BELIEVE what Bruce Easton said here...:
> >> (for vi I think the ed command to switch them
> >>  would be:  :g/html \"1\" ^A/s/html \"1\" ^A/jsfile \"1\" ^A/g)
> >
> > I believe you mean :s not :g  ...and if you're not on the line in 
> > question, then :%s
> >
> > mark->



More information about the Filepro-list mailing list