0

With the Nerdcommenter plugin, is there an easy way to comment out lines in a django template? I know we could use {% comment%} ... {% endcomment %} to comment lines, but it is not one of the shortcuts in Nerdcommenter I think.

Thanks in advance!

1 Answers1

0

NERD commenter uses 'commentstring' to decide how to make a comment.

Add the following to ~/.vim/after/ftplugin/htmldjango.vim:

set commentstring={%\ comment\ %}%s{%\ endcomment\ %}

For more help see:

:h NERDComInstallation
:h 'commentstring'
Peter Rincker
  • 43,539
  • 9
  • 74
  • 101