[ubuntu-uk] Advanced vi/vim command - commenting out a large section

Johnathon Tinsley kirrus at kirrus.co.uk
Mon Aug 18 17:15:16 BST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

We sometimes need to quickly comment out a, for example, vhost config in
vi. Now, I've worked out that you can add the first comment #, ESC and
then hit DOWN, FULL-STOP, DOWN, FULL-STOP etc to quickly comment out
multiple lines.

But, what I'd love, is a way I can type say 11 <command> and get it to
turn 11 lines into a comment.

Does anyone know of a nice way to do that in vim?

Johnathon


- --
Blog: http://kirrus.co.uk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIqaAU81bUwCB/xdgRAmDVAJ4oOqTPsaPBtUesRSuWsCOJwjHU5QCg31Jf
OMEgENYwm0bIyBH7pyw27FI=
=+hXg
-----END PGP SIGNATURE-----



More information about the ubuntu-uk mailing list