VS Code provides an action panel to change the indentation settings
I change it from Spaces: 2
to Spaces: 4
. However, when I click on a different file, it goes back to Spaces: 2
, forcing me to manually go through every file in my codebase an click the setting.
I would expect there to be a way to apply this system-wide. Is there?
2
Answers
1. Press F1 >
Preferences: Open Settings (UI)
2. Set
Editor.tabSize
to desired value3. Disable
Editor.detectIndentation
Put the following in your settings.json file:
The setting’s description:
You may also find it useful to add the following:
The setting’s description: