Toggle blocks of line comments.
https://github.com/tpope/vim-commentary| Installer Source| Releases (json) (tab)
Toggle blocks of line comments.
https://github.com/tpope/vim-commentary| Installer Source| Releases (json) (tab)
To update (replacing the current version) run webi vim-smartcase
.
These are the files / directories that are created and/or modified with this install:
~/.vimrc
~/.vim/pack/plugins/start/vim-commentary/
~/.vim/plugins/smartcase.vim
Makes it super easy to toggle entire blocks of comments.
gc
v
to enter visual modelhjkl
(or arrow keys) to select linesgc
to toggle comments on or offUpdate ~/.vim/plugins/commentary.vim
with a line like this:
autocmd FileType apache setlocal commentstring=#\ %s
All the typical navigation applies:
Use
gcc
to comment out a line (takes a count),gc
to comment out the target of a motion (for example,gcap
to comment out a paragraph),gc
in operator pending mode to target a comment. You can also use it as a command, either with a range like:7,17Commentary
, or as part of a:global
invocation like with:g/TODO/Commentary
. - The Official README