问题描述
我在项目中同时具有Java和Scale代码。通常在一个任务中编辑两种类型的代码。我输入了Java代码格式的 google-java-code-style模式,并在intellij IDEA中安装了 scalafmt插件。
I have both Java and Scale code in the project. Editing 2 types of code in one task is common. I inputted the google-java-code-style schema for Java code format and installed the scalafmt plugin in the intellij IDEA.
他们两个都使用 Ctrl + Shift + L 重新格式化代码。当我按下这些热键时,如何确定已调用正确的电话。我觉得目前所有代码都已通过google-java-code-style模式格式化。
Both of them use Ctrl+Shift+L to reformat the code. How can I make sure the correct one has been called when I press those hot keys. I feel all the code were formatted by the google-java-code-style schema for the moment.
是否有任何指标可以告诉我哪个格式或插件被触发以重新格式化?
Is there any indicators could inform me which schema or plugin is triggered for the reformatting?
推荐答案
您可以从以下位置更改快捷方式。
You can change the shortcuts from..
-
从主菜单中,选择File | Windows和Linux或JetBrains Rider上的设置|在macOS上选择偏好设置,然后在左侧选择键盘映射。
From the main menu, choose File | Settings on Windows and Linux or JetBrains Rider | Preferences on macOS, then choose Keymap on the left.
选择一个预配置的键盘映射,您希望将其用作新键盘映射的基础,然后单击复制。接受默认名称,或根据需要进行更改。
Select one of the pre-configured Keymaps, which you want to use as the base for the new one, and click Copy. Accept the default name, or change it as required.
这篇关于如何确保在intelliJ中应用了正确的代码格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!