How Can I make sure I applied the correct code format in intelliJ

安稳与你 提交于 2019-12-11 10:19:20

问题


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.

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?


回答1:


You can change the shortcuts from..

  1. From the main menu, choose File | Settings on Windows and Linux or JetBrains Rider | Preferences on macOS, then choose Keymap on the left.

  2. 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.



来源:https://stackoverflow.com/questions/54980326/how-can-i-make-sure-i-applied-the-correct-code-format-in-intellij

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!