1. 在设置中搜索“tabsize” ,将下图中两个地方都改为4 2. 搜索:“detectindentation”,将前面的勾选去了 3. 选择要格式化的文件,右键选中“格式化文档” 格式化之前: 格式化 之后