IntelliJ IDEA Tips

written in ide, idea, intellij, jetbrains, productivity, tips

Here are a couple of IntelliJ IDEA shortcuts and configurations I wish I’d known sooner.

1. Changing the default font

The first thing I do every time I have to configure a new installation of IntelliJ is setting the theme to Darcula.

The second thing I do is changing the font to Fira Code, and enabling font ligatures. Here’s how it looks like:

You can enable this from Settings > Editor > Font. Make sure to check Enable font ligatures if you like that symbol.

2. Auto-reformat

If you’re one of those developers that is obsessively hitting ⌥⇧⌘L to get your code reformatted on every keystroke then I’m about to change your life.

First install the Save actions plugin. Now open Settings > Other settings > Save actions, in there select:

  • Activate save actions on save
  • Reformat file
  • And customize any other inspection and quick fix to your liking

Now your can just spit your ugly code and it’ll get perfectly formatted on each save. Nice uh?

3. Extend selection

This is not a configuration, but one of my favorite shortcuts. I learned this from a talk by Hadi Hariri.

What is it for? Paraphrasing the IntelliJ blog:

Structural selection allows you to select expressions based on grammar. By pressing ⌥↑ you keep expanding your selection (starting from the caret). And vice versa, you can shrink it by pressing ⌥↓.1

Here you can see it in action:

Just mentioning this one because it was new to me at the time and nowadays I find myself using it all the time!

Have any IntelliJ tip to share? I’d love to know about it! Post a comment down here 👇

  1. Had to update the key mappings in the quote because they were old in the original blog post.