tags:

views:

262

answers:

1

I am using NERD commenter

Let's say that I want to comment out lines from 78 to 172. This is what I do. I calculate the difference. That is 94. put my cursor on line 78 and then I do: 94 , c space

In this way I comment 94 lines starting from line number 78.

I don't like the calculation that I need to do. I was hoping to pass a range something like

78,172 to comment the code from line 78 to 172. Am I missing something.

Looking at the popularity of this plugin, it seems there must be a better way to comment and uncomment.

+3  A: 

I'd do (in visual mode) :78v172G to select and highlight lines 78 to 172, then just ,c<space>.

Alex Martelli