Whenever I get a new machine, reinstall my system, or start at a new workplace with a freshly installed IntelliJ IDEA, there are a few key settings I always configure right away. They save time, reduce friction, and help me stay focused on writing code instead of fighting the IDE.
1. Auto Import on the Fly
In the past, I used to lose precious minutes manually importing every missing package — especially when pasting code snippets from colleagues or external sources. Enabling “Auto-import on the fly” ensures that IntelliJ automatically takes care of import statements as I write code.
It might seem like a small thing, but over the course of a day (or sprint), it adds up to a lot of saved time and fewer frustrating interruptions.
👉 Settings → Editor → General → Auto Import →Optimize imports on the fly
👉 Settings → Editor → General → Auto Import →Add unambiguous imports on the fly
2. Optimize ‘Class Count to Use Import with '*'’
There’s a long-standing debate: should you import individual classes or use wildcard imports when there are too many from the same package? Some teams even enforce thresholds like "only use wildcard if you import more than 5 classes."
To avoid inconsistencies and potential issues during code reviews or merges, I usually set this threshold to a very high number — effectively disabling wildcard imports.
👉 Settings → Editor → Code Style → Java → Imports → Class count to use import with *
👉 Settings → Editor → Code Style → Java → Imports → Names count to use static import with *
3. Compact Mode (Flattened Tree View)
I learned to code on a tiny-screen laptop. With limited screen real estate, navigating long folder trees was a pain.
Enabling Compact Mode (in the Project tool window) tightens up the spacing, making the file tree more readable — especially on smaller screens — without sacrificing clarity.
👉 Settings → Appearance → UI Options →Compact Mode
4. Show Editor Tabs Vertically (on the side)
If you’re like me and tend to keep multiple files open (especially during deep work), you’ve probably seen this:
FooService
FooServiceRepository
FooServiceController
All squeezed into horizontal tabs like this:
FooServ... | FooServ... | FooServ...
Not great. To solve this, I move the editor tabs to the side. That way, I get to see the full class names, can adjust their width, and enjoy slightly more vertical space in the actual code editor.
👉 Settings → Editor → General → Editor Tabs → Tab placement → Right
5. Keep Package Hierarchy Intact (Yes, Really)
I know a lot of folks love “Flatten Packages” for a cleaner, one-line view of their package structure.
But personally, I prefer keeping the full hierarchy visible. It helps me better understand the module and package architecture — especially in larger codebases where structure matters.
Also, I find it more intuitive when navigating between similarly named classes across packages.
To each their own, but if you’re like me, make sure to disable Flatten Packages:
👉 Project View → Options → Appearance → Uncheck “Flatten Packages”
Do you have similar IntelliJ rituals? Or any settings you can’t live without?
Let me know in the comments — I’d love to pick up a few new tips too. 😊