Skip to main content
10 of 21
Active reading [<https://en.wikipedia.org/wiki/Visual_Studio_Code>].
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

Well, the new version of Visual Studio Code allows you to specify differently file type for the tabSize. Here is the example of my settings.json with default four spaces and JavaScript/JSON two spaces:

{ // I want my default to be 4, but JS/JSON to be 2 "editor.tabSize": 4, "[javascript]": { "editor.tabSize": 2 }, "[json]": { "editor.tabSize": 2 } } 

PS: Well, if you do not know how to open this file, you can: click left-bottom gear -> then settings

Xin
  • 37.1k
  • 18
  • 89
  • 99