写完代码后可以点菜单中code-reformat code,快捷键是option+command+L 转载于:https://www.cnblogs.com/walter371/p/4539929.html