【问题标题】:Manually indent needed again when HTML tag is closed in VS Code在 VS Code 中关闭 HTML 标记时需要再次手动缩进
【发布时间】:2017-10-09 21:55:45
【问题描述】:

在 Microsoft VS Code 中,当我关闭 HTML 标记时(例如在底部图像上),当前位置将移动到第一列并删除标签缩进。然后我需要再次使用制表符手动缩进。我该如何解决?

我的 settings.json 文件:

... “editor.detectIndentation”:假, “editor.wrappingIndent”:“无”, “editor.trimAutoWhitespace”:假, “files.trimTrailingWhitespace”:假, “files.insertFinalNewline”:是的, “html.format.endWithNewline”:假, ...

【问题讨论】:

  • "editor.detectIndentation": false, 是您的问题。让true

标签: html tags visual-studio-code newline indentation


【解决方案1】:

我将settings.json中的选项设置为:

“editor.detectIndentation”:真, “editor.autoIndent”:假

它现在正在工作。固定。

【讨论】:

    【解决方案2】:

    在你的settings.json"editor.detectIndentation": false,是你的问题。让true.

    ...
    "editor.detectIndentation": true,
    "editor.wrappingIndent": "none",
    "editor.trimAutoWhitespace": false,
    "files.trimTrailingWhitespace": false,
    "files.insertFinalNewline": true,
    "html.format.endWithNewline": false,
    ...
    

    【讨论】:

      猜你喜欢
      • 2021-02-03
      • 1970-01-01
      • 2018-03-05
      • 2018-01-09
      • 2011-06-07
      • 2018-12-21
      • 1970-01-01
      • 2011-03-03
      • 1970-01-01
      相关资源
      最近更新 更多