1、打开设置 文件 > 首选项 > 设置 2、修改 Tab Size 将默认的4修改为2 3、修改 editor.detectdentation 搜索 editor.detectdentation,取消勾选 就此,好了