2

我正在使用 Visual Studio Code 开发 Node.js 应用程序。我已经浏览了他们在编辑器中配置缩进空间的文档,但我找不到它。我用过 Sublime Text,所以我习惯了这个选项。

如何以这种方式为 Visual Studio Code 配置 .editorconfig 文件?

4

2 回答 2

5

您可以在https://github.com/editorconfig/editorconfig-vscode获得 .editorconfig 支持的插件

于 2015-11-24T21:20:54.940 回答
1

转到File -> Preferences -> User Settings|Workspace Settings并添加这样的代码

{
  ...
  "editor.tabSize": 2, // Controls the rendering size of tabs in characters. Accepted values: "auto", 2, 4, 6, etc. If set to "auto", the value will be guessed when a file is opened.
  "editor.insertSpaces": true, // Controls if the editor will insert spaces for tabs. Accepted values:  "auto", true, false. If set to "auto", the value will be guessed when a file is opened.
  ...
}
于 2015-07-28T13:25:45.300 回答