Facebook Application

Ken Cole ken.m.cole at gmail.com
Wed Dec 16 18:44:44 PST 2009


Actually:

% means the entire file and other commands can follow it, not just "s"

and from what I can find % and g do mean the same thing as would
:1,419s if you knew there were 419 lines in the file.  The other two
options are easier but for the sake of the discussion! :-)

On Thu, Dec 17, 2009 at 11:54 AM, Fairlight <fairlite at fairlite.com> wrote:
> You'll never BELIEVE what Ken Cole said here...:
>> 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.
>
> Huh.  I've been using %s for that, rather than g.  The leading command, not
> the "globally within line" suffix.
>
> It -seems- that they're semantically the same, although I'd like to know if
> I'm right in that assessment.  I'll ask here, since I believe the person
> that taught me %s is deceased. :(
>
> mark->
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>


More information about the Filepro-list mailing list