1.打开setting,找到Plugins选项 2.输入Save Action,然后点在线搜索 重启idea 进去到settings 找到 Save Actions,勾选对应选项 最后,在程序中, Ctrs+S 自动格式化