vi editing

Giorgos Keramidas keramida at ceid.upatras.gr
Fri Jan 15 19:01:05 UTC 2010


On Fri, 15 Jan 2010 07:37:49 -0800 (PST), gahn <ipfreak at yahoo.com> 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 /



More information about the freebsd-questions mailing list