0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

htmlの自動整形を無効化した

Posted at

問題の事象

hoge.html
    <h1>Items List data2</h1>
    <ul>
      {% for i in "012345" %} {% for j in "012" %} {% if True:}
      ~~~~

期待値

hoge.html
    <h1>Items List data2</h1>
    <ul>
      {% for i in "012345" %} 
        {% for j in "012" %} 
          {% if True:}
      ~~~~

setting.jsonを開く

windowsならCtrl + ,Ctrl + Fsettingsと入力

settings.json
  "editor.formatOnSave": true,
  "files.associations": {
    "**/templates/**/*.html": "html"
  },
  "[html]": {
    "editor.formatOnSave": false
  }

以上。
ひとまずこれでok。本当は「{}」この記号の扱いをどうにかできれば一番いいんだけど、応急処置ってことで。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?