Vim NERD Commenter \c deletes the line instead of toggling comments
Asked Answered
J

2

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?

Joby answered 6/11, 2014 at 20:27 Comment(0)
A
10

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

Avernus answered 6/11, 2014 at 20:39 Comment(1)
Thanks that wasn't obvious to me!Joby
O
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
Otter answered 11/6, 2015 at 12:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.