- Instant help with your Developer coding problems

Change indentation in VS Code

Question:
How to change indentation in VS Code?
Answer:
File -> Preferences -> Settings -> Text Editor -> Tab Size
File -> Preferences -> Settings -> Text Editor -> Detect Indentation
Description:

Visual Studio Code has multiple indentation settings by default. It can convert tabs to spaces and also can detect indentation rules based on the current file. If you want the same indentation in all of your files you can set the tab size parameter File -> Preferences -> Settings -> Text Editor -> Tab Size . However, this setting is overridden based on the file contents when Editor: Detect Indentation is on so you need to turn it off: File -> Preferences -> Settings -> Text Editor -> Detect Indentation

Share "How to change indentation in VS Code?"