vi editing

Chad Perrin perrin at
Fri Jan 15 18:19:11 UTC 2010

On Fri, Jan 15, 2010 at 12:11:32PM -0600, J.D. Bronson wrote:
> preface each line:
> :%s/^/new word /g

The trailing g isn't needed because you only need one substitution on
each line.  Thus:

    :%s/^/new word /

Chad Perrin [ original content licensed OWL: ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list