Vim-commentary

Vim-commentary

Install commentary

Plug 'tpope/vim-commentary'

Configuration

You can add your own custom key mapping for it.

For Ex:

nnoremap <space>/ :Commentary<CR>
vnoremap <space>/ :Commentary<CR>

Then, Just press / and it will comment out the line.

In visual mode select the text you want to comment out and press /


However, I still prefer these default settings. ``` To comment/uncomment on a motion such as 4j: 'gc' To comment/uncomment single line: 'gcc' To comment/uncomment on visual block, after selecting block: 'gc' ```

commentary


Tagged in gvim