Use standard HTML/JS/CSS comments inside a Django template while keeping syntax highlighting?

Answered

Hey there,

 

I started using PyCharm a while ago for my Python projects. Since then I've started using it as an editor for other documents, including for working on templates for Django projects.

 

The syntax highlighting for Django's template engine is amazing, it helps so much to keep template files from becoming a jumbled mess.

 

However one of the frustrating aspects of this feature is that it forces everything within the template to use the standard {# Django comment syntax #}.

 

I'd love to be able to keep syntax highlighting, but be able to comment out sections of my code using the proper syntax (whether it is HTML/JS/CSS).

 

I've noticed if I set the template language to "None" in Settings -> Languages and Frameworks -> Python Template Languages, I get the desired behavior for the comments, but I lose out on the syntax highlighting.

 

Does anyone know of a way to combine these two things? It would significantly improve my workflow.

2
1 comment

Unfortunately, that's not possible at the moment.

Please feel free to submit a feature request about it to our issue tracker using the link https://youtrack.jetbrains.com/issues/PY

0

Please sign in to leave a comment.