IntelliJ IDEA

Date Published:
Last Modified:

Quick Reference

Make ProjectCtrl-F9 (Windows)You can change the project settings to that artefacts (such as .jar files) are generated at the same time as make.
Run (without debugging)Shift-F10 (Windows)
Ctrl-R (Mac)
Runs the last active configuration. Debugging IS NOT enabled.
Run (with debugging)Ctrl-D (Mac) Shift-F9 (Windows)
Runs the last active configuration. Debugging IS enabled. Note that IdeaVim on Mac can override the Ctrl-D shortcut to jump down half a page. You can disable this behaviour so that it "runs" instead.
Step OverF8 (Windows)Use to "step over" current line of code when debugging. Step-over is one of the most commonly used debug features.
Step IntoF7 (Windows)Use to "step into" the current line of code while debugging. This will enter the method (if any) on the current line of code.
Resume ProgramCmd-Alt-R (Mac)Continue running the program if it has been paused while debugging.
Show Project WindowAlt-1 (Windows)Shows the file structure of the project (by default this on the left-hand side of the screen).
Show Code Structure WindowCmd-7 (Mac)
Alt-7 (Windows)
This gives a great overview of the class inside the current file (e.g. it lists all the variables and methods). This shortcut will also jump the cursor to the code structure window if already open.
Quick DocumentationCtrl-Q (Windows)Great for checking up on what a class or method does as you are about to use it.
Reformat CodeCtrl-Alt-L (Windows)Corrects the coding indentation of the current file. Great for automatically tidying up code after serious refactoring has taken place.

vim Plugin

IntelliJ supports the IdeaVim plugin which adds vim-like functionality to the IDE.

This plugin supports configuration using a ~/.ideavimrc file, which is similar in format to a typical .vimrc file, except that it allows special extensions to directly control IntelliJ through an API.

I have noticed that IdeaVim cannot deal with large files that well (e.g. a 50,000 line .json file), and I have to disable the plugin to be able to work with these files.

Slow Deployment

One problem I have noticed in IntelliJ is the slow upload of files to a server through SSH. Even though IntelliJ was configured to only upload changed files, it was still painfully slow in uploading the 10-20 file changes that occurred whenever I switched between git branches. Below is an example of the slow transfer speed as reported by IntelliJ after some local files changed:

[17/03/20, 4:00 PM] Automatic upload completed in 11 minutes: 64 items deleted, 374 files transferred, 14 items failed (9.7 kbit/s)

In the end I gave up on using IntelliJ for this and instead used rsync, which was about 10-100x faster.

Related Content:


comments powered by Disqus