How to Change Tab Size in VSCode for macOS and Windows?
How can we change our VSCode indentation, or tab size?
Some of us prefer 2
spaces, while others may prefer 4
spaces.
Open Settings
First, let’s open VSCode’s Settings
.
- On macOS, this will be under
Code
→Preferences
→Settings
.- We can also use the macOS shortcut:
⌘ + ,
- We can also use the macOS shortcut:
- On Windows, this will be under
File
→Preferences
→Settings
.- We can also use the Windows shortcut:
Ctrl + ,
- We can also use the Windows shortcut:
Search for tab size
Under Search settings
, let’s search for tab size
.
We should see a result for Editor: Tab Size
.
There, we can set the number of spaces that a tab should be equivalent to.
The settings should be applied immediately.