multi-line edit in vi

Doran L. Barton fozz at
Wed Apr 9 11:03:41 MDT 2008

Not long ago, Wade Preston Shearer proclaimed...
>> Would you mind ellaborating on what exactly it is you want to do?
>> If what you want to do is make a similar change to multiple lines, then,
>> yes, it is VERY possible.
> Yes, that is what I want. Add a "#" to the begging of six lines in a row 
> for example. Or remove a "#" from several lines in a row. Or, add "<li><a 
> href="">" to the beginning of several lines of text. You get the idea.

Hitting 'v' to go into Visual Block mode will let you highlight a few
lines. Then, you can use regular expression substitution to make

:s/^/# /

(REplace the beginning of the line with '# '.)


fozz at is Doran L. "Fozz" Barton
 " Stop: Drive Sideways."
    -- Detour sign in Kyushi, Japan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : 

More information about the PLUG mailing list