Recommended IntelliJ IDEA settings
These are my must-have settings tweaks for IntelliJ IDEA, mixed with some useful tips. However, I recommend going through all the preferences in the Settings Dialog yourself. You probably don't even know about some problems the IDE can solve for you when adjusted correctly.
Check out my config-files for more IDEA settings.
How to change settings
There are several ways to change settings in IntelliJ IDEA.
To open the Settings Dialog, select "File" → "Settings…" or use the Ctrl
+ Alt
+ S
shortcut. You can then navigate through the settings in the left panel. Speed up the search by using quick find: type part of the setting name to filter the options.
Sometimes you don't even need to open the settings dialog. Press Ctrl
+ Shift
+ A
and type the setting name. If it's a checkbox option, you can press Return
to toggle the setting — effective immediately!
Finally, some settings are only applied to the current project, e.g., the JavaScript language level. To customize default project settings, go to "File" → "Other Settings" → "Default settings…".
Show current IDEA memory usage in the status bar
☑ Appearance & Behavior → Appearance → Show memory indicator
Activate this option to show the current IDE heap level and memory usage in the lower right corner of the status bar. Additionally, you can click this widget to run the garbage collector.
For big projects you might want to increase the maximum heap memory size. Open IDE_HOME\idea[64][.exe].vmoptions
and adjust the -Xmx
value.
Adjust for widescreen
☑ Appearance & Behavior → Appearance → Widescreen tool window layout
If you have a widescreen monitor, you should enable this setting. This will give you more space for your side panels.
Notice: those screenshots are highly exaggerated to demonstrate the difference — usually, you wouldn't open so many panels. If you do, consider the Ctrl
+ Shift
+ F12
shortcut to toggle the panels and maximize the editor view.
Zoom with the mouse wheel
☑ Editor → General → Change font size (zoom) with Ctrl+Mouse Wheel
That's a feature known from most other text editors and browsers, but it's disabled by default. Enable this option to zoom using Ctrl
+ Mouse Wheel
. Since IDEA 2021.3, you can decide whether all tabs should be affected.
Show line numbers in the editor gutter
☑ Editor → General → Appearance → Show line numbers
That's self-explanatory. Additionally, press Ctrl
+ G
to navigate to a line number.
Wrap long lines
☑ Editor > General > Use soft wraps in editor ☑ Editor > General > (Console >) Use soft wraps in console Editor > General > Use custom soft wraps indent/additional shift: 1
If you don't like scrolling long lines horizontally, activate word wrapping. I also like to add a small indent. When you put the cursor on a wrapped line, IntelliJ will additionally insert small arrow symbols to highlight the wraps.
Improve tab appearance
☑ Editor → General → Editor Tabs → Hide file extension in editor tabs ☐ Editor → General → Editor Tabs → Show "close" button on editor tabs
By hiding both file extensions and close icons, you'll gain a lot of free space in the editor tab panel. File icons are enough to infer the file types, and you're still able to close tabs by pressing the middle mouse key or Ctrl
+ F4
.
Hadi Hariri, who gives great talks about IntelliJ Tips and Tricks, recommends turning off editor tabs. Instead, use Ctrl
+ E
to switch between recent files and Ctrl
+ Shift
+ E
to switch between recently edited files.
Sort debugger fields alphabetically
☑ Build, Execution, Deployment → Debugger → Data Views → Sort alphabetically
By default, debugger variables are listed in the order in which they were defined. I find this makes it harder to find the right values.
Bonus tip: you can focus any list/tree panel (like debugger variables, or the project view) and search for a value by starting to type. If multiple values match the search string, use ↓
and ↑
keys to step through them. In this example I typed mo
, so I can toggle the selection between module
and mongoose
:
Improve Java imports
☑ Editor → General → Auto Import → Add unambiguous imports on the fly
This will add import statements automatically if there's only one class in the classpath with the exact name.
Editor → General → Auto Import → Exclude from Import and Completion
If you want to use the List
class, IntelliJ won't import it automatically, even with the previous option enabled. That's because there are two List
classes in the classpath: java.util.List
and java.awt.List
. Fortunately, you can exclude classes and packages from code completion. It works exactly like Type Filters in Eclipse. I usually exclude:
com.sun
sun
java.awt.List
java.sql.Date
and some project-specific packages.
You don't need to add those entries manually. Whenever IntelliJ suggests multiple classes to import, press →
and select the class or package to exclude.
Remove unused sidebar panels
That's a new feature in IntelliJ IDEA 15. Finally, we can remove unwanted tool window buttons: right-click a sidebar button and select Remove from sidebar. You can restore a hidden tool window with View → Tool Windows.
Use a custom terminal shell
☑ Tools → Terminal → Shell path
IDEA comes with a handy terminal panel (Alt
+ F12
). However, using the default Windows command prompt can sometimes be annoying. Fortunately, you can use a more useful shell within IntelliJ IDEA, like the Git Bash (by default under C:\Program Files\Git\bin\bash.exe
).
You can customize the terminal font and colors here:
☑ Editor → Colors & Fonts → Console Font/Colors