如何在 Visual Studio 代码中为 CSS 文件和 html 或 PHP 文件留出空格?

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

我有 Windows 10 的 VSC。有一个选项可以为文本缩进指定空格或制表符,但我需要两者: CSS 文件的空格(包括媒体查询中的四个空格) html 和 PHP 文件的选项卡。这可能吗?谢谢

您可以在 settings.json 文件中尝试这样做:

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

等等