Html file reformat with curly brackets

Hey,

I have this code:

{% extends "layout.html" %}
{% block content %}
{% for post in posts %}
<h1> {{post['title']}}</h1>
{% endfor %}
{% endblock content %}

 

But when I copy this to another file or try to use ctrl+shift+L it does not reformat good but takes all to the left.
How can I make a reformat template for this?

Thanks!

P.S
Should I used webstorm or Phpstorm? What is the difference?

 
0
1 comment

What syntax is it? Looks like Django template. For proper Django support, please try PyCharm, this is a Python templates language. But Twig templates look quite similar - you can use Twig plugin (https://plugins.jetbrains.com/plugin/7303-twig) that is supported in both WebStorm and PHPStorm to work with these templates

0

Please sign in to leave a comment.