Gillian
Gillian

Reputation: 287

How can I have spaces for CSS files and tabs for html or PHP files in Visual Studio Code?

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.

Upvotes: 0

Views: 339

Answers (1)

Guillermo Brachetta
Guillermo Brachetta

Reputation: 4775

You could try this in your settings.json file:

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

etc.

Upvotes: 1

Related Questions