繁体   English   中英

Visual Studio代码缩进配置和EditorConfig?

[英]Visual Studio Code Indent Configuration & EditorConfig?

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

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

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

转到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.
  ...
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM