I'm using the NerdCommenters leader c<space> to toggle comments on blocks of C code, but when those blocks already contain C comments, they get replaced, by default with [> and <], and toggling the comment back off doesn't replace these placeholder with /* and */ again.

I've learned doing two explicit uncomments, or an explicit uncomment (leader-cu) after the uncommenting toggle, reverts the placeholders back to /* and */.

Can things be set up so I don't need the extra uncomment? I'd like to limit myself to using just leader c<space> (toggle comment).

  • 2
    You could open an issue in the main git repo of the plugin. The devs would know better.
    – 3N4N
    Commented Aug 24, 2019 at 11:34

1 Answer 1


Still not solving your issue, but sort of a workaround:

Memorize to type leader-cu. to uncomment a comment with a nested one, the . repeats the last command.

  • Thanks for the suggestion but it doesn't work for me. I tried it and . is not repeating the leader -cu. Commented Oct 28, 2021 at 9:19
  • 2
    This might work if the plugin in question supports tpope's repeat.vim
    – D. Ben Knoble
    Commented Oct 29, 2021 at 17:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.