This is a small post written after a presentation on Java User Group Graz regarding IntelliJ tricks.
The presentation is available here on Github and I want to summarize some interesting things that I didn’t know / forgot:
Shift + Shift
: “Search everywhere”. Nice and very powerful shortcut. Search in class names / file names / methods. Didn’t know.- If you are stuck with too many editor tabs, then… turn them off (Set tab position to
None
). UseCtrl+E
(recent files) instead. As a bonus you can search for the name of the file there (just type it) - Close all tool windows, use
Alt+1..9
to show them temporarily andShift+Esc
to close them. - Instead of “Project Structure” tool window (
Alt+1
) use the navigation bar:Alt+Home
and then use arrows to navigate. - Now you have the whole screen for editing, but chances are the code fills only the left part. You can use
Split Screen Vertically
to have two files opened simultaneously (or the same one). There’s no shortcut for that, useCtrl+Shift+A
and search for “split” - In the “Project Structure” tool window go to settings and enable
Autoscroll to Source
andAutoscroll from source
. Almost always useful. - Useful plugins:
Key Promoter X
– detects what you do with a mouse and gives a notification window if you can do it with a keyboard shortcut. - If you have a variable
a
then try typinga.null
and pressing Enter. What you get is: if
(a == null) { }
- Similarly
a.notnull
creates:if
(a != null) { }
But there are many more, check Live Templates
in settings