IntelliJ — Get the most out of your IDE

Sethu
6 min readJul 8, 2021

IntelliJ is a powerhouse. I have been using IntelliJ for the last 15 years and haven’t found another IDE that is as capable as this one. When I find people who have mostly worked on dynamically typed languages such as Javascript and Ruby, and try Java or Kotlin for the first time, they not only have to battle with a new language and how slow everything is, but also have to work with a more enriched IDE rather than a simple editor such as Vim or VSCode.

For statically typed languages your IDE is your friend. It can help you with so much more, especially refactoring support. You are not limited to just find and replace sort of changes, but you can change method signatures, extract interfaces, variables, methods, etc.

If you are new IntelliJ, this page might help you get started. If you are already using IntelliJ, you could quickly skip through bits you know and pick up new tips that will help boost your productivity.

Essential Plugins

Key Promoter X

This is the first plugin I recommend you get. After installing this plugin a small balloon will pop up on the bottom right, showing you a keyboard shortcut that you can use when you click on something with a mouse. Once you pick up these shortcuts you will find yourself being super productive with your IDE. Try not using the mouse.

Material Theme UI

This is an amazing plugin that transforms the look and feel of your IDE. If you are tired of drab looking but functional Darcula and IntelliJ Light themes that ship as standard themes with your IDE, and keep wondering why can’t I have the themes that VSCode has, this plugin is for you. It changes your IDE from

to

Rainbow Brackets and Indent Rainbow

With both these plugins you get a clear idea which bracket belongs where and balancing your brackets when you stuffed up somewhere doesn’t take long.

Material Icons

Last one to spruce up your workspace. It helps to quickly select the write file from your file explorer when files of different types have different icons.

IDE Tweaks

Memory

When I say IntelliJ is a powerhouse, I really mean it. It consumes a lot of CPU and a lot of memory. If you have a laptop that has 32GB RAM, I would say not to keep all that RAM away from your IDE and feed it some juice. It will make everything feel soo much more snappier and make you happier.

There are 2 ways to increase the memory size allocated to IntelliJ —

  1. IntelliJ Toolbox (Recommended) — This is an app that you download and install. It appears as an icon on your menu bar. You can use this app to download IntelliJ IDEA and update it. You can also use it to tweak it’s settings.

On the settings page tweak the memory settings. If IntelliJ is all you will be working on mostly, give it as much as you can.

2. You can also tweak the memory here —

Important shortcuts you need map yourself

IntelliJ comes inbuilt with a huge amount of shortcuts. But there are few keys ones that they didn’t map. It’s a lot more productive if you do.

In IntelliJ, open Preferences -> Keymap

Switch between multiple projects

When you now hit Shift + Cmd + P, you get a window like this

Easy to switch between multiple IntelliJ project windows.

Abbreviations

With the sheer number of shortcuts some of them are next to impossible to remember. Even if you do, you need to press so many keys at the same time to execute the command, your fingers will start to hurt. Some of the shortcuts is like the IDE programmers are playing Twister with you and silently laughing their butts off. Instead, there are abbreviations you can use.

First off, remember this, if you don’t remember a shortcut, don’t feel bad, just relax and meditate, the shortcut will come to you.. :)
Or remember just one — Cmd + Shift + A — This is the mother of all shortcuts. This brings up a window like this, start typing into it and it will show you the action along with the shortcut that can be used to execute it.

Instead of hitting enter on this window, Esc out and execute the command with the shortcut that IntelliJ has just taught you.

Coming back to abbreviations. Sometimes when there are too many keys to press or there just isn’t enough keys unmapped to create a shortcut, you can create an abbreviation

The shortcut for Split and move right is crazy! Look at the keys you need to press. Instead we assigned an abbreviation of sv to this action. To execute it, first bring the Mother of all shortcuts window up and then type sv

This is still easier than moving your mouse to the tab, right clicking and selecting split and move right.

Case Insensitive Code completion

Do yourself a favour and configure IntelliJ to complete your code regardless of whether your first letter was capital or not.

Disable Match case.

Presentation Mode

IntelliJ comes with Presentation mode. But I find it kinda limiting as it hides the file explorer. Also if you are remote pairing, presentation mode is not the way you would want to pair. But at times, depending on your size of monitor, the font size is way to small for your remote pair to read. Instead, I suggest doing the below:

Shortcut Keys

I started off listing all the shortcuts I use here, but IntelliJ already has a nice quick reference that you can use. It’s here —

I have placed it below for completeness

Live Templates

Intellij has live templates that you can use. I create these macros when I constantly keep having to type out the same piece of code again and again. For example: I use assertj for assertions and you write the below code quite often


assertThat(<actual>).isEqualTo(<actual>)

Instead of having to type this all the time I type at and then hit tab. This places the code on the screen for me

assertThat(<cursor is placed here>).isEqualTo()

Doing that is really easy

I hope you enjoyed this post and found it useful.

--

--

Sethu

I work as a software developer. I love pecking away on a keyboard coding.