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

问题描述 投票:0回答:1

我的缩进太小了。但是我也不想使用超过2个空格进行缩进。有没有增加尺寸的方法?

当前视图,

enter image description here

期望视图,

enter image description here

visual-studio-code vscode-settings
1个回答
1
投票

由于您未使用任何格式程序类型扩展名

您可以通过在状态栏中选择缩进选项来轻松设置缩进。

Indenting status bar

Indenting options

,然后选择所需的尺寸。

如果要全局设置相同的设置。

将这些值添加到您的settings.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.

© www.soinside.com 2019 - 2024. All rights reserved.