IntelliJ is the de-facto main IDE for Java Development. Therefore I have to live with it, whether I like it or not. Well, it isn’t THAT bad and most annoyances can be fixed.
Registry Settings
A few tweaks that un-clutter IntelliJ a bit.
- uncheck
project.tree.structure.show.url
to hide the file path next to the module name - check
ide.hide.real.module.name
to show the directory name instead of the maven module name.
Appearance
I use Material Theme UI, as it’s the best way to remove all the unnecassary whitespace. The Color Scheme is Night Owl, which became my primary color scheme in general.
In addition I disabled every other visual interruption like the Main Menu, Breadcrumb Navigation or the statusbar. Every Tool Window (in IntelliJ-lingo these are the “Sidebars”) is in Undock mode, so it’s only visible when I need it and doesn’t interrupt the rest of the layout. The Project View is on the left, everything else opens from the bottom.
In a perfect world I would be able to open the Project View in a popup like “Recent Files”). However I haven’t found a solution in order to achieve this.
High-Level Workflow
Usually I have a two-split layout. Work is usually done on the left side.
To get around inside of a file I mostly use Navigate/File Structure. From this point on I use AceJump to move my cursor to a specific location.
Navigation between files happens mostly through Go to Class…, Recent Files and - if both doesn’t help - Go to File….
Keyboard Shortcuts
I’m a keyboard guy, so my goal is to use the keyboard as much as possible. Sadly, the default shortcuts are in my opinion neither intuitive nor ergonomic. Common actions rely a lot on the F-Row which is especially painful when working on a laptop. My recommendation is to remove every assigned shortcut which goes beyond basic text editor navigation. Start programming and you’ll quickly notice what you need.
The only thing I want to show you is the Second Keystroke technique: Instead of holding down your Modifier (like Ctrl) and press another key (like C) to execute copy, you enter a “mode” first. The real action is dependent on the key you press afterwards.
Need an example? Think pressing Alt+N. Then leave their keys like normal and press J afterwards to create a new Java File. Or you press T afterwards to create a TypeScript File. Or press C afterwards to create a CSS File. And the list goes on. As you see, your keyboard has now much more space to bind your actions to.
Recommended Plugins
AceJump
Use this plugin if you already see the place where you want your cursor. In the Plugin Settings, set Minimum typed characters to 2 and disable Search whole file to improve the performance. I also recommend to enable Show hint with search text for a slightly improved developer experience and to catch typos better.
Finally, I only assign Start AceJump in Target Mode to a shortcut.
To be honest, I feel like I could replace this plugin with something more lightweight since I only need a very small subset of AceJump’s functionality.
String Manipulation
Converts a selected string to a different casing, e.g. converts CamelCase to snake_case. I have mapped Ctrl+S to open the popup menu. Then I start typing to select the needed conversion.
Tab Shifter
This Plugin provides missing actions for moving (“shifting”) tabs to other splits.
Keymap
Some default keybindings like Copy, Paste, Cut, Find and Undo are so universal I don’t want to remap them.
Stroke | Description |
---|---|
F2 | Rename |
Ctrl+E | Recent Files |
Ctrl+N | Go to Class… |
Ctrl+T | Switch to other split |
Ctrl+S | String Manipulation |
Alt+S | Surround With… |
The advanced actions provided by IntelliJ are remapped into a “two stroke” actions. The first stroke selects a “Group”, and the second one triggers the actual action from that group.
First Stroke | Second Stroke | Description |
---|---|---|
Alt+␣ | F | Show in Files (opens explorer) |
“General” | O | Navigation/File Structure |
S | Switch case | |
, | Main Menu | |
Alt+J | I | Show Instances |
“Java(Script)” | M | Move Instant Method |
Alt+R | D | Debug… |
“Run” | R | Run… |
Alt+R | Rerun | |
Alt+E | C | Extract Constant |
“Extract” | M | Extract Method |
P | Extract Parameter | |
V | Extract Variable | |
Ctrl+G | I | Go to Implementation(s) |
“Go” | J | AceJump |
L | Go To Line:Column | |
U | Go to Declaration or Usages | |
Alt+G | A | Annotate with Git Blame |
“Git” | C | Commit |
H | History | |
L | Log | |
Alt+L | Local Changes | |
P | Cherry-Pick Selected Changes | |
U | Update Project | |
Alt+N | C | New Changelist |
“New” | F | New File |
J | New Java Class | |
P | Create new directory or package | |
Alt+T | L | Shift left |
“Tabs & Splits” | N | Split right |
L | Shift left | |
X | Close tab | |
X | Close tab | |
Alt+V | D | Debug tool window |
“View” | G | Git tool window |
P | Project tool window |
A Few More Notes
- I don’t have a shortcut for “Git Push”. Instead, I always bring up the “All Actions”-Menu, write “Push” and hit Enter.
- While I like Vim and use it for simple text editing, I don’t use the typical Vim-Navigation Keys HJKL because I use my own keyboard layout. This causes HJKL not to be on the home row. Hence, I would loose the speed while keeping the unintuitivity of them.