Vi commenting out
Roger Oberholtzer
roger
Tue Oct 17 03:57:45 PDT 2006
On Tue, 2006-10-17 at 08:22 +0100, Jorge Almeida wrote:
> On Mon, 16 Oct 2006, Michael Hipp wrote:
>
> > Is there any simple trick for having vi comment out a whole range of lines by
> > placing a '#' in front of them? The manual method of i # ESC j is rather
> > tedious if there is a big section to be done.
> >
> Are you talking about the real vintage vi, as opposed to vim?
>
> With vim, I select the range in visual mode and just do :s/^/#/
> Actually, I use a visual mode macro to do it (Ctrl-X Ctrl-D to comment
> and Ctrl-X Ctrl-U to uncomment). It's as easy as I could wish.
> (Don't know a thing about vi...)
My vim (6.3.84) does not do this. How are you selecting the text to
comment?
Is this macro (Ctrl-X Ctrl-D) something you have defined?
--
Roger Oberholtzer
OPQ Systems AB
Ramb?ll Sverige AB
Kapellgr?nd 7
P.O. Box 4205
SE-102 65 Stockholm, Sweden
Tel: Int +46 8-615 60 20
Fax: Int +46 8-31 42 23
More information about the Linux-users
mailing list