web-mode icon indicating copy to clipboard operation
web-mode copied to clipboard

Keybinding for django template comment

Open kjnez opened this issue 1 year ago • 2 comments

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.

kjnez avatar Feb 19 '24 20:02 kjnez

You mean in your .emacs ?

fxbois avatar Feb 20 '24 06:02 fxbois

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 %}?

kjnez avatar Feb 20 '24 23:02 kjnez