I like VSCode when saving autoformat until it messed up with my template code.
It incorrectly formats my django template syntax into one line code (sometimes a very long line). Therefore instead of this code
{% for row in 'ABCDEFGH' %} <tr> {% for col in '123456789012345' %} <td> {% with forloop.counter|stringformat:"s" as counter %} {% with row|add:counter as seat_num %} {% if seat_num not in oc_seats %} <input type="checkbox" value="{{ row }}{{ forloop.counter }}" name="seats"> {% endif %} <br> {{ seat_num }} {% endwith %} {% endwith %} </td> {% endfor %} </tr> {% endfor %}
I have this code
{% for row in 'ABCDEFGH' %} <tr> {% for col in '123456789012345' %} <td style="text-align: center; border: 1px solid #aaa;"> {% with forloop.counter|stringformat:"s" as counter %} {% with row|add:counter as seat_num %} {% if seat_num not in oc_seats %} <input type="checkbox" value="{{ row }}{{ forloop.counter }}" name="seats"> {% endif %} {{ seat_num }} {% endwith %} {% endwith %} </td> {% endfor %} </tr> {% endfor %}
I tried to disable the format when saving by changing the user settings to {"editor.formatOnSave": false}
, but still have not received any luck.
Is there any plugin or configuration that I can use to improve performance?
PS: I am using VSCode version 1.9 on Sierra MacOSx
source share