Intellij idea IntelliJ/WebStorm“;“聪明的”;换行符上的缩进/制表符

Intellij idea IntelliJ/WebStorm“;“聪明的”;换行符上的缩进/制表符,intellij-idea,ide,webstorm,Intellij Idea,Ide,Webstorm,因此,这似乎是一个相当琐碎的问题。 在声明对象并指定值时: let object = { myValue: "some value" <--- Now typically here I would hit <comma> <enter> } 现在发生的事情: let object = { myValue: "some value", anotherValue: "some other value" <--- What is w

因此,这似乎是一个相当琐碎的问题。 在声明对象并指定值时:

let object = {
    myValue: "some value" <--- Now typically here I would hit <comma> <enter>
}
现在发生的事情:

let object = {
    myValue: "some value",
        anotherValue: "some other value" <--- What is with this additional tabspace?
}
let对象={
我的价值:“一些价值”,
另一个值:“另一个值”我把它排序了。
因此,它非常特定于以下条件:

  • 您正在编辑的文件在缩进/制表符上有
    x
    空格
  • 默认的缩进/制表符间距是
    y
  • Webstorm,假设您想应用:
    y
    indent/tab空格,当点击tab键时,或在选项卡式/缩进元素上创建新行时。因此它应用
    y
    indent空格。但它也识别文件每个缩进有
    x
    空格

    结果是,当您在缩进元素上单击tab键时,它将缩进
    x
    空格;当您在缩进元素上创建换行时,它将缩进
    y
    空格

    要更改此设置,您可以通过
    x
    spaces将Webstorm配置为tab,或者配置其动态文件选项卡/缩进空间检测

    禁用缩进/制表符空间检测
    文件>设置>代码样式|缩进检测

    调整制表符/缩进间距
    文件>设置>代码样式>{Language}

    let object = {
        myValue: "some value",
            anotherValue: "some other value" <--- What is with this additional tabspace?
    }