VSCode: How do you autoformat on save?

后端 未结 3 1902
無奈伤痛
無奈伤痛 2021-02-18 15:01

In Visual Studio Code, how do you automatically format your source code when the file is saved?

3条回答
  •  盖世英雄少女心
    2021-02-18 15:42

    Go to settings -> settings.json file and paste below code

    {
        "explorer.confirmDelete": false,
        "editor.formatOnSave": true,
        "terminal.integrated.rendererType": "dom"
    }
    

    It will format your code on save.

提交回复
热议问题