如何为Intellij IDEA启用自动格式的代码? [英] How enable auto-format code for Intellij IDEA?
本文介绍了如何为Intellij IDEA启用自动格式的代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
键入';'后是否可以在Intellij IDEA中使用或按"Enter"键是否已格式化此字符串?
Is it possible in Intellij IDEA after typing ';' or press 'Enter' happened formatting of this string?
例如, 到:
a+b=10;
之后:
a + b = 10;
或唯一可能的选项:代码>重新格式化代码... ?
谢谢!
推荐答案
Intellij IDEA中的格式化快捷方式是:
The formatting shortcuts in Intellij IDEA are :
- 对于Windows: Ctrl + Alt + L
- 对于Ubuntu: Ctrl + Alt + Windows + L
- 对于Mac:⌥(可选) + ⌘(命令) + L
- For Windows : Ctrl + Alt + L
- For Ubuntu : Ctrl + Alt + Windows + L
- For Mac : ⌥ (Option) + ⌘ (Command) + L
这篇关于如何为Intellij IDEA启用自动格式的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文