How to change the per-language configuration of setting “editor.insertSpaces” to “auto”

前端 未结 1 1296
走了就别回头了
走了就别回头了 2021-02-12 11:29

I\'m using VS Code to edit projects in multiple languages (mostly Ruby, PHP and Javascript) and for each language we have different indentation models (spaces/tabs and width). L

相关标签:
1条回答
  • 2021-02-12 11:43

    To use perlanguage settings, you use the [language_id] in square brackets:

    example:

    {
      "[typescript]": {
        "editor.formatOnSave": true,
        "editor.formatOnPaste": true
      },
      "[markdown]": {
        "editor.formatOnSave": true,
        "editor.wrappingColumn": 0,
        "editor.renderWhitespace": "all",
        "editor.acceptSuggestionOnEnter": false
      }
    }
    

    Update: editor.tabSize and editor.insertSpaces are now supported in version 1.10

    0 讨论(0)
提交回复
热议问题