[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: vim question - comment multiple lines
- From: "A. S. Budden" <redhat mail southparade vispa com>
- To: redhat-list redhat com
- Subject: Re: vim question - comment multiple lines
- Date: Wed Sep 10 03:41:04 2003
Thus spake Herculano de Lima Einloft Neto:
>
> I guess this is an easy one.. how can I insert / delete something at
> the beggining of each line of a block in vi? Still can't figure it,
> though there must be at least ten ways.
Lots of ways...
0 Ctrl-V jjjjj selects the first column of the block you want to
comment, then I% <ESC> for example adds % on the start of every line.
Alternatively there are solutions like,
:.,.+5s/^/%/
To add a % at the start of every line between the current one and the
one in 5 lines time. Similarly,
0 Ctrl-V jjjjjx gets rid of them (assuming you're on the top row), as
does
:.,.+5s/^%//
There are other ways, but those are the ones I use most often.
Cheers,
Al
>
> Thanks in advance
> --
> Herculano de Lima Einloft Neto <hlen ig com br>
>
>
>
> --__--__--
--
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]