视觉工作室代码更改缩进 [英] visual studio code change indentation
问题描述
也许它可以作为一个设置,但是使用不同的名字,找到与缩进相关的任何东西。
在右下角的工具栏中,您会看到一个如下所示的项目:
点击它后,您将可以使用空格或制表符来选择缩进。选择您的缩进类型后,您将可以选择更改缩进大小。在上面的例子中,缩进被设置为每个缩进4个空格字符。如果选中tab作为缩进字符,那么您将看到制表符大小而不是空格符
如果您想要有这适用于所有文件,而不是在个人文件的基础上,重写 editor.tabSize
和 editor.insertSpaces
设置在用户设置或工作区设置中根据您的需要
For every typescript file visual studio code uses an auto indentation of 8 spaces. This is a bit too much for my taste but I can't find where to change it.
Maybe it's available as a setting but under a different name as I can't find anything related to indentation.
In the toolbar in the bottom right corner you will see a item that looks like the following: After clicking on it you will get the option to indent using either spaces or tabs. After selecting your indent type you will then have the option to change how big an indent is. In the case of the example above, indentation is set to 4 space characters per indent. If tab is selected as your indentation character then you will see Tab Size instead of Spaces
If you want to have this apply to all files and not on an idividual file basis, override the editor.tabSize
and editor.insertSpaces
settings in either User Settings or Workspace Settings depending on your needs
这篇关于视觉工作室代码更改缩进的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!