Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jan 2010 21:01:02 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        gahn <ipfreak@yahoo.com>
Cc:        freebsd general questions <freebsd-questions@freebsd.org>
Subject:   Re: vi editing
Message-ID:  <87y6jzmbv5.fsf@kobe.laptop>
In-Reply-To: <723540.47549.qm@web52106.mail.re2.yahoo.com> (gahn's message of "Fri, 15 Jan 2010 07:37:49 -0800 (PST)")
References:  <723540.47549.qm@web52106.mail.re2.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 15 Jan 2010 07:37:49 -0800 (PST), gahn <ipfreak@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 /




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87y6jzmbv5.fsf>