numToStr / Comment.nvim

:brain: :muscle: // Smart and powerful comment plugin for neovim. Supports treesitter, dot repeat, left-right/up-down motions, hooks, and more

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiline none line visual `gc` behaviour

ModProg opened this issue · comments

The title was a bit confusing, just wasn't sure how to phrase it.

Hitting gc with a visual selection:

If one has an inline selection, we get block comments:
grafik

Using the visual line mode we should get line comments
grafik

But what about non line visual mode spanning multiple lines, currently we get line comemnts for the full line as well, but that doesn't actually comment the section that was selected but also the rest of the line.

It would be neat if we could have block comments then:
grafik

I could also see having line comments, but only the selection, though that would need a bit more logic to detect whether there is anything after the selection in the last line:
grafik

Same consideration should be given to visual block select:
grafik

Exspecially, because while for the other examples gb can be used instead, that is not the case here:
grafik