suh*_*eti 7 visual-studio-code
他们如何不同地解释?我只能看到“editor.tabSize”的作用,即制表符占用的空格数。
谢谢你。
从配置文件:
{
// Controls the rendering size of tabs in characters.
// If set to auto, the value will be guessed based on the opened file.
"editor.tabSize": 4,
// Controls if the editor will insert spaces for tabs.
// If set to auto, the value will be guessed based on the opened file.
"editor.insertSpaces": true
}
Run Code Online (Sandbox Code Playgroud)
如您所见,editor.tabSize
设置了输入时占用的空间大小tab
。同时editor.insertSpaces
配置文件中存储的密钥代码。
如果editor.insertSpaces
等于,false
则 Visual Studio Code 将为#09
每个tab
. 当您更改editor.tabSize
现有代码时,将更改所有行中的缩进,#09
并存储一个 字符。
如果editor.insertSpaces
等于,true
则 Visual Studio Code 将为space
每个字符tab
而不是#09
字符插入字符。插入的数量在spaces
中配置editor.tabSize
。更改editor.tabSize
现有代码时不会更改缩进,因为#09
文件中没有存储字符。只有新tab
笔画会受到新值的影响editor.tabSize
。
如果您和其他团队成员仅 tab
用于缩进,那么设置editor.insertSpaces
为 false没有问题。如果您和其他团队成员使用space
或 tab
缩进,那么您应该设置editor.insertSpaces
为 true。否则,当有人打开具有不同值的文件时,您的文件可能看起来很尴尬editor.insertSpaces
。
归档时间: |
|
查看次数: |
3294 次 |
最近记录: |