IntelliJ 設定存檔自動 formatter

Below is Neil's answer updated.

IntelliJ 13 Steps:

透過巨集錄制完成後並設定成快速鍵。
  1. Code -> Reformat Code
  2. Edit -> Macros -> Start Macro Recording
  3. Code -> Reformat Code
  4. File -> Save all
  5. Edit -> Macros -> Stop Macro Recording
  6. Name the macro (something like "formatted save")
  7. File -> Settings -> Keymap
  8. Right click on the macro. Add Keyboard Shortcut. Set the keyboard shortcut to Control + S
  9. IntelliJ will inform you of a hotkey conflict. Select "remove" to remove other assignments.

留言

此網誌的熱門文章

nginx 上安裝 TWCA 憑證