I have VSC for Windows 10. There is an option to specify spaces OR tabs for text indentation, but I need both: spaces for CSS files (including four spaces inside media queries) and tabs for html and PHP files. Is this possible? Thanks.
1 Answer
You could try this in your settings.json file:
{ "[css]": { "editor.insertSpaces": true }, "[html]": { "editor.insertSpaces": false }, "[php]": { "editor.insertSpaces": false } } etc.
3 Comments
Gillian
Thanks. That works. Once I'd found out where the settings.json file is located. In case anyone else is looking for this, the guide online gives the location of the file in Windows as %APPDATA%\Code\User\settings.json but on Windows 10 it's actually \Users\Username\Appdata\Roaming\Code\User\settings.json (I'll try and report this to get the new location added).
Guillermo Brachetta
Oh, you can just open it with the command palette and then look for "Open Settings (JSON)".
Gillian
Yes, I found that after I'd found it the long way. I haven't used the command palette before.