我正在使用Visual Studio Code开发Node.js应用程序。 我已经完成了他们在编辑器中配置缩进空间的文档,但我找不到它。我使用过Sublime Text,所以我已经习惯了这个选项。
如何以这种方式为Visual Studio Code配置.editorconfig文件?
答案 0 :(得分:5)
答案 1 :(得分: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.
...
}