首先是Ctrl + shift + p打开控制面板,搜索settings, 点击这个settings.json { “editor.formatOnType”: true, “editor.formatOnSave”: true }