We can setup user settings for this,
Go to File > Preferences > User Settings:
You can customize this easily via these 3 settings in
/ The number of spaces a tab is equal to. This setting is overriden
// based on the file contents when editor.detectIndentation
is true.
"editor.tabSize": 4,
// Insert spaces when pressing Tab. This setting is overriden
// based on the file contents when editor.detectIndentation
is true.
"editor.insertSpaces": true,
// When opening a file, editor.tabSize
and editor.insertSpaces
// will be detected based on the file contents.
"editor.detectIndentation": true
For more information -
We can setup user settings for this,
Go to File > Preferences > User Settings:
You can customize this easily via these 3 settings in
/ The number of spaces a tab is equal to. This setting is overriden
// based on the file contents when editor.detectIndentation
is true.
"editor.tabSize": 4,
// Insert spaces when pressing Tab. This setting is overriden
// based on the file contents when editor.detectIndentation
is true.
"editor.insertSpaces": true,
// When opening a file, editor.tabSize
and editor.insertSpaces
// will be detected based on the file contents.
"editor.detectIndentation": true
For more info you can check here - How to set tab-space style?