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 <[EMAIL PROTECTED]>
> 
> 
> 
> --__--__--

-- 


-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to