0

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 1

1

You could try this in your settings.json file:

{ "[css]": { "editor.insertSpaces": true }, "[html]": { "editor.insertSpaces": false }, "[php]": { "editor.insertSpaces": false } } 

etc.

Sign up to request clarification or add additional context in comments.

3 Comments

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).
Oh, you can just open it with the command palette and then look for "Open Settings (JSON)".
Yes, I found that after I'd found it the long way. I haven't used the command palette before.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.