VS Code: How To Change Indentation (2 spaces, 4 spaces)

Last updated on February 9, 2022 A Goodman Loading... One comment

This short and straight-to-the-point article shows you how to change the indentation in VS Code (Visual Studio Code).

1. Open your VS Code and:

  • Go to Code > Preferences > Settings if you’re using macOS (shortcut: Command + ,).
  • Go to File > Preferences > Settings if you’re using Windows (hotkey: Ctrl + ,).

2. Type “Indentation” into the search field then head to the “Editor: Tab Size” section. Replace the default space number with your preferred one:

Your setting will be applied and reflected immediately. If this doesn’t happen (it’s a little lag sometimes), just reload or restart your VS Code.

Further reading:

You can also check out our Visual Studio Code topic page for more tips and tricks to improve your producibility and coding experience. Happy coding!

Subscribe
Notify of
guest
1 Comment
Inline Feedbacks
View all comments
Kleyton885
Kleyton885
10 months ago

Thanks, it was very helpful!

Related Articles