Vim: vim-commentary
vim-commentary
is a plugin that help make commenting code in a variety of languages much easier.
gcc
toggle comments for [count]
lines.
gc{motion}
toggle comments over lines covered by the {motion}
.
{visual}gc
toggle comments over lines covered by the {visual}
selection.
:[range]Commentary
Toggle comments for the specfied range.
Some examples:
gc3j
toggle comments for this line and the next 3 linesgcaf
comment out function in Go, uses theaf
text object provided by thevim-go
plugingci(
toggle comments inside parenthesis.
Resources
:help commentary.txt