Reputation: 2020
I know how to change indentation (tab size), and currently I automatically change the indentation according to the file, e.g. when the default size is 2 but the file size is 4 VSCode automatically uses 4 in that file.
Currently I'm using indentation 2 spaces as default. However, I'm working in two projects at the moment, one that uses 4 and another that uses 2 and every time I create a new file VSCode defaults to 2 regardless of the project I'm in. I would like VSCode to adjust the indentation project-wide and not per file.
Is that possible?
Upvotes: 0
Views: 516
Reputation: 11176
It can be done with the extension "EditorConfig for VSCode" (https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig). Then you create and maintain project specific .editorconfig files (https://editorconfig.org/), for example
root = true
[*]
indent_style = space
indent_size = 4
Upvotes: 2