web-mode
web-mode copied to clipboard
Keybinding for django template comment
Can I add a keybinding for django comment {% comment %} {% endcomment %}? I know you can invoke it by using "C-c C-s" (Insert snippet). But since I use it a lot, it's preferable for me to add a keybinding.
You mean in your .emacs ?
Yep. (web-mode-comment-style 2)
is not enough for me. It does the comment but django still picks up whatever is commented during rendering (plus {# ... #}).
Another thing I noticed is that if I highlight a block, and "C-c C-s" + "comment", it becomes
{% comment __block__ %}
{% endcomment %}
I understand that this is a snippet but is it possible to change the behavior to
{% comment %}
__block__
{% endcomment %}?