[Novalug] vi question

Sean McGowan scepticanagramwonk@verizon.net
Sat Apr 11 21:41:18 EDT 2009


:v/^$/s/^/  /
will do the trick.

You have had a few basic vi questions recently.  I am a big fan.  Once
you get the hang of a modal editor, the only reason to use emacs would
be to learn a little lisp (unless you like obnoxiously long key
sequences).  You may try reading the man pages, or google vi tutorial.
There are tons out there and I'm not sure if I can think of anything
more useful than knowing regex.


On Sat, 2009-04-11 at 16:37 -0400, Charles M Howe wrote:
> List,
> 
> I have a fairly length text file that I created using vi. It consists of
> data, one line, then, usually but not always a blank line. I wish to add
> two spaces at the beginning of eac line, but I would prefer not to put
> them in the blank lines. How can I do this? Fwiw, I have a copy of
> "Linux in a Nutshell", 5th edition, which has a chapter on vi. (If you
> can tell me what page the info is on, that would be a bonus.)
> 
> Charlie
> 
> 
> _______________________________________________
> Novalug mailing list
> Novalug@calypso.tux.org
> http://calypso.tux.org/cgi-bin/mailman/listinfo/novalug




More information about the Novalug mailing list