On Tue, 7 Feb 2012, Алексей Данченков wrote:


Hi!

I just started diving into vi (and just subscribed to the mailing list) and so far learned a basic moving around/editing commands. While I am going through the basic book, is there a fast way to comment out a paragraph with -# in the same column with the cursor position (indenting the lines accordingly)?

Not built-in, no.  I find The NERD Commenter¹ extremely useful.

<Leader>c<Space> toggles commenting on the current line, or visually-selected region. I use ',' as my leader character², so it's <,><c>< >.

I also find VIM Addon Manager³ even more useful. If you set that up first, you'll be able to install the commenter via:

:InstallAddons The_NERD_Commenter

--
Best,
Ben

¹: http://www.vim.org/scripts/script.php?script_id=1218
= https://github.com/scrooloose/nerdcommenter

²: See:
:help mapleader

³: https://github.com/MarcWeber/vim-addon-manager

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to