Blog.

The best IntelliJ IDEA keyboard shortcuts for Mac

Cover Image for The best IntelliJ IDEA keyboard shortcuts for Mac
Wayne / Devscover
Wayne / Devscover

Here are a few of the most useful ones:

Control + Option + O – Optimises Imports (removes imports you don’t need)

Command + Option + L – Formats your code

Option + Enter – Import (if on a red highlighted piece of code)

Command + / – Line comments all selected code

Command + Shift + / – Block comment for all selected code

Command + J – Brings up live templates
(then you can type for example m – and in Python it will auto generate the main method)