Is there a way to remove unused imports in Intellij IDEA on commit?
It is not very optimal to do it manually, CTRL + ALT + O helps but it's still manual.
Is there a way to remove unused imports in Intellij IDEA on commit?
It is not very optimal to do it manually, CTRL + ALT + O helps but it's still manual.
In Mac IntelliJ IDEA, the command is Cmd + Option + O
For some older versions it is apparently Ctrl + Option + O.
(Letter O not Zero 0) on the latest version 2019.x
Or you can do the following shortcut :
MAC : Shift + Command + A (Enter Action menu pops up)
And write :
Optimize Imports
In mac book
IntelliJ
Control + Option + o (not a zero, letter "o")