Posted By: Anonymous
For every typescript file visual studio code uses an auto indentation of 8 spaces. This is a bit too much for my taste but I can’t find where to change it.
Maybe it’s available as a setting but under a different name as I can’t find anything related to indentation.
I’m currently using the Prettier code formatter and that solves all formatting problems by auto formatting on save (if there is no syntax error)
You can change this in global
User level or
Open the settings: Using the shortcut Ctrl , or clicking
Settings as shown below.
Then, do the following 2 changes: (type
tabSize in the search bar)
- Uncheck the checkbox of
- Change the tab size to be 2/4 (Although I strongly think 2 is correct for JS :))