Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keybinding for django template comment #1298

Open
kjnez opened this issue Feb 19, 2024 · 2 comments
Open

Keybinding for django template comment #1298

kjnez opened this issue Feb 19, 2024 · 2 comments

Comments

@kjnez
Copy link

kjnez commented Feb 19, 2024

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.

@fxbois
Copy link
Owner

fxbois commented Feb 20, 2024

You mean in your .emacs ?

@kjnez
Copy link
Author

kjnez commented Feb 20, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants