You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The builtin default commenting feature also ads the gc text object, so e.g. dgc allows to delete the comment block. It would also be useful if there is an 'inner comment' to delete everything but the commentstring.
Currently, this can also be done using nvim-treesitter-textobjects with the @comment.inner capture, although that works slightly different, as it does not grab the 'largest contiguous block of non-blank commented lines around the cursor'.
It's something I, and I expect others too, use quite often to rewrite a whole comment. It would be nice to not depend on nvim-treesitter-textobjects for this (small) functionality.
Expected behavior
Example:
-- this is a comment-- block
cigc:
-- |
Where | marks the cursor position.
Or a begin-end commentstring like HTML:
<!-- html comment -->
cigc:
<!-- | -->
The text was updated successfully, but these errors were encountered:
Problem
The builtin default commenting feature also ads the
gc
text object, so e.g.dgc
allows to delete the comment block. It would also be useful if there is an 'inner comment' to delete everything but the commentstring.Currently, this can also be done using nvim-treesitter-textobjects with the
@comment.inner
capture, although that works slightly different, as it does not grab the 'largest contiguous block of non-blank commented lines around the cursor'.It's something I, and I expect others too, use quite often to rewrite a whole comment. It would be nice to not depend on nvim-treesitter-textobjects for this (small) functionality.
Expected behavior
Example:
cigc
:-- |
Where
|
marks the cursor position.Or a begin-end commentstring like HTML:
<!-- html comment -->
cigc
:<!-- | -->
The text was updated successfully, but these errors were encountered: