Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio code 如何增加缩进中空格的大小?_Visual Studio Code_Vscode Settings - Fatal编程技术网

Visual studio code 如何增加缩进中空格的大小?

Visual studio code 如何增加缩进中空格的大小?,visual-studio-code,vscode-settings,Visual Studio Code,Vscode Settings,我的压痕太薄了。但我也不想使用超过2个空格来缩进。有没有办法增加尺寸 当前观点 期望视图 因为您没有使用任何格式化程序类型扩展 通过选择状态栏中的缩进选项,可以轻松设置缩进 然后选择所需的尺寸 如果希望全局具有相同的设置 将这些值添加到设置中。json "editor.tabSize": 4, //4 = 4 spaces "editor.detectIndentation": true, // this will auto detect whether your file

我的压痕太薄了。但我也不想使用超过2个空格来缩进。有没有办法增加尺寸

当前观点

期望视图


因为您没有使用任何格式化程序类型扩展

通过选择状态栏中的缩进选项,可以轻松设置缩进

然后选择所需的尺寸

如果希望全局具有相同的设置

将这些值添加到
设置中。json

    "editor.tabSize": 4, //4 = 4 spaces
    "editor.detectIndentation": true, // this will auto detect whether your file is using spaces or tabs to indent. 
    "editor.insertSpaces": true, // Insert spaces when pressing Tab. This setting is overridden based on the file contents when #editor.detectIndentation# is on.


您是否正在使用任何格式化程序扩展,如prettier或beautify?或者只是默认的vscode格式化程序?@tHeSiD否,我没有使用任何扩展名进行格式化。如果您使用的是比例字体,请使用单空格字体。你是如何得到这两个截图的?@rioV8,在第一个截图“editor.fontfalism”:“Fira Mono”,在第二个截图“editor.fontfalism”:“哦,我误解了你的问题。我的错。在这种情况下,您可以尝试更宽的单空间字体,如Courier Prime Code或Monaco。等