8

The following works fine for me, it will comment out the current line:

<Leader>cc

but according to the docs (https://github.com/scrooloose/nerdcommenter#usage) if I want to toggle comments I do:

<Leader>c

which deletes the current line for me.

Am I missing something?

Liam
  • 1,041
  • 2
  • 17
  • 31

2 Answers2

10

This command is actually <Leader>c<space>, not just <Leader>c (see this issue; this is not properly displayed in the readme).

jonafato
  • 1,595
  • 14
  • 21
0

mac

map <C-_> <plug>NERDCommenterToggle<CR>
imap <C-_> <Esc><plug>NERDCommenterToggle<CR>i

windows

" Alt-/ to toggle comments
  map <A-/> <plug>NERDCommenterToggle<CR>
  imap <A-/> <Esc><plug>NERDCommenterToggle<CR>i
wcc526
  • 3,915
  • 2
  • 31
  • 29