vi editing

Mike Clarke jmc-freebsd2 at milibyte.co.uk
Fri Jan 15 18:23:13 UTC 2010


On Friday 15 January 2010, gahn wrote:

> Hi gurus:
>
> I am trying to add a word on every line (right in front of every
> line) via vi. Right now I have:
>
> xxxxxxxxx
> xxxxxxxxx
> xxxxxxxxx
>
> after that, I want to have:
>
> "new word" xxxxxxxxx
> "new word" xxxxxxxxx
> "new word" xxxxxxxxx
>
> How could I do that with vi?

:%s/^/"new word"/

-- 
Mike Clarke


More information about the freebsd-questions mailing list