如何重新格式化 IntelliJ 中所有打开的文件

How to reformat all the open files in IntelliJ

是否有任何快捷方式可以重新格式化 IntelliJ 中所有打开文件中的代码?我正在寻找一种方法来重新格式化编辑器中所有 打开的文件 而不是项目中的所有文件。

我推荐的最接近的方法是 select 来自项目资源管理器的根文件夹,然后按 alt+command+L(MAC OS)。重新格式化代码 window 弹出。在弹出窗口中,select 范围为打开文件并单击 运行。它格式化所有打开的文件

Intellij 文档 -->https://www.jetbrains.com/help/idea/reformat-and-rearrange-code.html#reformat_module_directory