folke / ts-comments.nvim

Tiny plugin to enhance Neovim's native comments
Apache License 2.0
321 stars 23 forks source link

feature: ability to comment visually selected text #15

Closed dhananjaylatkar closed 4 months ago

dhananjaylatkar commented 4 months ago

Did you check the docs?

Is your feature request related to a problem? Please describe.

When I visually select text and press gc it comments whole line.

e.g.

static int fun() {}

If I select static in above code and press gc whole line is commented, resulting in -

// static int fun() {}

Describe the solution you'd like

static int fun() {}

If I select static in above code and press gc only selected part should be commented, resulting in -

/* static */ int fun() {}

Describe alternatives you've considered

"numToStr/Comment.nvim" has this behavior

Additional context

No response

folke commented 4 months ago

ts-comments.nvim is an enhancement to Neovim's native comments. Those are linewise only