vim-commentary icon indicating copy to clipboard operation
vim-commentary copied to clipboard

Commenting out the whole block, including blank lines

Open pag opened this issue 8 years ago • 5 comments

When selecting

foo

bar

and commenting the result is

# foo

# bar

It would be nice if the blank line were commented too, or if vim-commentary could be configured that way. The use case is that when there are multiple blocks of commented code near each other it's much easier to distinguish each block if the leading column is the comment character for the full extent.

pag avatar Sep 19 '16 08:09 pag

I concur - even if it is optional/separate commands, this would be very helpful.

jakykong avatar Oct 04 '16 15:10 jakykong

I would like to see this too.

jhclouse avatar Oct 24 '16 13:10 jhclouse

@tpope would you accept a pr for this?

snahor avatar Mar 02 '17 04:03 snahor

@snahor do you have a patch? I want to apply to a local fork given the maintainer's lack of interest but I find parts of the script impenetrable.

pag avatar Mar 27 '17 16:03 pag

In hindsight this might have been the better choice, but it gets weird when it comes to that extra space we add after the comment character. I am thinking maybe in 2.0 we drop the space, which would be a natural time to address this.

tpope avatar Apr 21 '17 02:04 tpope