【发布时间】:2016-07-05 00:02:52
【问题描述】:
如果我的 JavaScript 对象属性值超出了我的右边距,WebStorm 将通过与 + 符号连接将其分成第二行。这一切都很好。我在这里遇到了代码样式格式的问题。
有没有可能,WebStorm 会为此添加适当的缩进?
var obj = {
foo: "This is a much too long string " +
"which should be indented as shown here"
}
相反,它会像这样从换行中去除缩进:
{
foo: "This is a much too long string " +
"which should be indented here"
}
这是预期的行为吗? 也许我在某个地方弄错了设置?
我正在使用默认的代码样式设置。
【问题讨论】:
标签: javascript webstorm code-formatting