10-08-04 07:47 AM
2004-10-07, 20:46(+00), Kevin Collins:
[...]
> This can be simplified to:
>
> :%s/^/#/
This can even be simplified to:
:%s/^/#
With vim, you can use visual block selection. In normal mode:
gg<Ctrl-V>GI#<Cr>
(where <Ctrl-V> is pressing Control+V, and <Cr> is pressing
return)
> The '%' indicating "all lines", but faster to type than "1,$"...
>
> And conversely you can uncomment the whole file with:
>
> :%s/^#//
With visual block selection:
gg<Ctrl-V>Gd
--
Stephane
[ Post a follow-up to this message ]
|