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

Uncommenting a block without trailing space borks indentation

Open somini opened this issue 5 years ago • 2 comments

When uncommenting a block of lines without a space prefix, the uncommented lines with that space keep them, instead of removing them.

This is similar to #77


Example Input:

commentstring=> %s
> Quote
>
> Multiline

Output (with leading spaces):

 Quote

 Multiline

Expected:

Quote

Multiline

somini avatar May 04 '20 22:05 somini

I came here to report this issue exactly, so instead I just add a comment to show interest. It would be nice to have a fix for this!

Also: in the example above, the second quoted line is a single > but the exact same thing happens if there is a trailing space after the > (a common pattern in quoted mail messages).

xunam avatar Jun 04 '20 08:06 xunam

the exact same thing happens if there is a trailing space after the > (a common pattern in quoted mail messages).

Precisely my use case. I thought the trailing space would fix it, but you are right.

somini avatar Jun 05 '20 01:06 somini