【问题标题】:How can I change JavaScript Indentation on VSCode?如何更改 VSCode 上的 JavaScript 缩进?
【发布时间】:2018-08-15 07:29:58
【问题描述】:

我想做这样的缩进。 (数组不是列在一行,而是列在两行。)

但在我的 VSCode 中,它并没有像下图那样缩进。

如何设置?语言是 JavaScript。

【问题讨论】:

    标签: visual-studio-code indentation vscode-settings auto-indent


    【解决方案1】:

    转到用户设置(Ctrl + ,)并搜索editor.wrappingIndent。将值更改为indentdeepIndent

    【讨论】:

      【解决方案2】:

      为了wrappingIndent 工作, 我们需要为wordWrap 提供以下值之一:

      "editor.wordWrap": "on",
      "editor.wrappingIndent": "deepIndent"
      

      "editor.wordWrap": "bounded",
      "editor.wrappingIndent": "deepIndent"
      

      "editor.wordWrap": "wordWrapColumn",
      "editor.wrappingIndent": "deepIndent"
      

      【讨论】:

        猜你喜欢
        • 2017-08-04
        • 1970-01-01
        • 2020-07-24
        • 2019-12-01
        • 1970-01-01
        • 2018-06-05
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多