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 if adjusted correctly.

Table of Contents

  1. How to change settings
  2. Show current IDEA memory usage in the status bar
  3. Adjust for widescreen
  4. Zoom with the mouse wheel
  5. Show line numbers on the editor gutter
  6. Wrap long lines
  7. Improve tab appearance
  8. Sort debugger fields alphabetically
  9. Improve Java imports
  10. Remove unused sidebar panels
  11. Use a custom terminal shell

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 - simply type part of the setting name.

Settings Dialog - Quick Find
Settings Dialog - Quick Find

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!

Toggle settings
Toggle settings

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 on this widget to run the garbage collector.

IntelliJ Memory Indicator
IntelliJ Memory Indicator

For big projects you might want to increase the maximum heap memory size. Open IDE_HOME\bin\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. Basically, 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.

Widescreen turned off
Widescreen turned off
Widescreen turned on
Widescreen turned on

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.

Notice: zooming in/out is only temporary, it won’t affect other editor tabs.

Show line numbers on 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.

Wrap long lines
Wrap symbols, only visible when focused

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 will gain a lot of free space in the editor tab panel. File icons are enough to infer the file types, and you are still able to close tabs by pressing the middle mouse key or Ctrl + F4.

Tabs with extension and close icon
Tabs with extension and close icon
Smaller tabs
Smaller tabs

Hadi Hariri, who gives great talks about IntelliJ Tips and Tricks, recommends turning off editor tabs completely. Instead, use Ctrl + E to switch between recent files and Ctrl + Shift + E to switch between recently edited files. I’m currently trying out this idea (no pun intended), but it’s quite hard to quit the habit of using tabs.

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 simply 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:

Debugger variables sorted alphabetically
Debugger variables sorted alphabetically

Improve Java imports

Editor → General → Auto Import → Add unambiguous imports on the fly

This will add import statements automatically, if there is only one class in the classpath with the exact name.

Editor → General → Auto Import → Exclude from Import and Completion

Usually, 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 import assistance and 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.

Exclude import
Exclude import

Remove unused sidebar panels

That’s a new feature in IntelliJ IDEA 15. Finally we are able to remove unwanted tool window buttons. Just right click a sidebar button and select Remove from sidebar. You can restore a hidden tool window with View → Tool Windows.

Remove sidebar panel
Remove sidebar panel

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 quite annoying. Fortunatelly, 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