通过Intellij中的快捷键和菜单实现代码格式 [英] Code format via short key and menu in Intellij
问题描述
我在Windows
下的Intellij
中有一个Java项目.尝试通过使用Ctrl + Alt + L组合键设置代码格式,但这无济于事.万一我完美地进入菜单Code->Reformat Code
代码格式.为什么快捷方式不起作用?
I have java project in Intellij
under Windows
. Trying to format code by using Ctrl+Alt+L combination, but this does nothing. In case I go to menu Code->Reformat Code
code formats perfectly. Why shortcut not works?
UPD
键绑定:
推荐答案
检查是否已配置键盘快捷键.为此,请按 Ctrl + Alt + S ,导航到 键盘映射 ,打开 主菜单 下拉菜单,打开 Code 文件夹,并检查 Reformat Code 是否设置了组合键.您还可以通过搜索栏找到重新格式化代码.
Check that your keyboard shortcuts are configured. To do this, press Ctrl+Alt+S, navigate to Keymap, open up Main menu drop down, open Code folder and check that Reformat Code has a key combination set. You can also find Reformat Code via the search bar.
这篇关于通过Intellij中的快捷键和菜单实现代码格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!