On Tue, 2003-09-09 at 23:17, Herculano de Lima Einloft Neto wrote: > I guess this is an easy one.. how can I insert / delete something at > the beggining of each line of a block in vi? Still can't figure it, > though there must be at least ten ways.
(command mode) # inserts "string1" at beginning of all lines :1,$ s/^/string1/ # search/replace "string2" for "string1" at beginning of all lines :1,$ s/^string1/string2/ # delete "string1" at the beginning of all lines :1,$ s/^string1// Here's a really good cheatsheet: http://www.zippydesign.com/ying/linux/vi/index.html If this doesn't work for you, please be more descriptive. HTH. -- Jason Dixon, RHCE DixonGroup Consulting http://www.dixongroup.net -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://www.redhat.com/mailman/listinfo/redhat-list