On 17:36 15 Oct 2003, Jake McHenry <linux@xxxxxxxxxxxxxxxxx> wrote: | shrike-list-admin@xxxxxxxxxx wrote: | > On Wed, Oct 15, 2003 at 04:02:29PM -0400, Jake McHenry wrote: | >> Does anyone know of a way in the vi editor that I can add 2 spaces | >> infront of each and every line in a file? I know how to remove | them, | >> 1,$s/ //g ... But how can I add them back? | > | > First the g in the above command will remove all occurances | > of two spaces on a line. You should not have the g. | > | > I think what you want to do can be done with: | > 1,$s/^/ / | | I figured that out right after I posted it. And the /g works.. But it | must be that I don't have any other double spaces in my code. No. You're replacing "^", and there's only ever one of those per line. So the /g is redundant. -- Cameron Simpson <cs@xxxxxxxxxx> DoD#743 http://www.cskk.ezoshosting.com/cs/ Principles have no real force except when one is well fed. - Mark Twain -- Shrike-list mailing list Shrike-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/shrike-list