IntelliJ IDEA
IntelliJ IDEA is one of the most popular IDE among java developers. Ultimate and Community both editions are available for IntelliJ IDEA. In this article developers will find some useful plugins to boost their development experience as well as most used keymaps to keep their hands mostly on the keyboard.
Useful IntelliJ IDEA Plugins
-
To generate boilerplate code (e.g. Getter, Setter and so on) during compile time Lombok plugin is the best choice for the developers. It is very easy to use due to its annotation based code generation.
-
AsciiDoc plugin brings Asciidoc supports for the developer. It helps to write the technical documentation easily on the same IDE they have used for the development.
-
Extra Icons plugin helps to visually recognize different file formats almost instantly by their icons.
-
If you are struggling to find opening and closing brackets in your code, Rainbow Brackets plugin may help you. It helps developers to find brackets through rainbow coloring.
-
CodeGlance plugin is a code mini map. It helps to navigate fast across the editor window.
Keymaps
Keymap learning and presentation plugins for IntelliJ IDEA
Both plugin can be used together for learning shortcuts. |
Download the default keymap reference card by Jetbrains. This keymap card is also available inside your IDE under . |
Most Used Keymaps
Most used keymaps for productive development.
Shortcut | Purpose |
---|---|
General |
|
Alt+0-9 |
Open corresponding tool window |
Ctrl+Shift+A |
Find Action |
Ctrl+Alt+S |
Open Settings dialog |
Ctrl+Alt+Shift+S |
Open Project Structure dialog |
Ctrl+Shift+F12 |
Toggle maximizing editor |
Search/Replace |
|
Shift+Shift |
|
Editing |
|
Alt+Enter |
Show intention actions and quick-fixes |
Ctrl+Shift+Enter |
Complete current statement |
Ctrl+Alt+L |
Reformat code |
Ctrl+W Ctrl+Shift+W |
Extend or shrink selection |
Ctrl+/ Ctrl+Shift+/ |
Add/remove line or block comment |
Ctrl+P |
Parameter info (within method call arguments) |
Ctrl+Shift+Space |
Smart code completion |
Ctrl+Shift+Space |
Smart code completion |
Navigation |
|
F2 Shift+F2 |
Navigate between code issues |
Ctrl+E |
View recent files |
Ctrl+B |
Go to declaration |
Ctrl+N |
Go to class |
Ctrl+G |
Go to line |
Ctrl+Shift+I |
Open quick definition lookup |
Usage Search |
|
Alt+F7 |
Find usages |
Live Templates |
|
Ctrl+Alt+J |
Surround with Live Template |
Ctrl+J |
|
Refactoring |
|
Ctrl+Shift+Alt+T |
Invoke refactoring |
Debugging |
|
F8 |
Step over |
F7 |
Step into |
Alt+F8 |
Evaluate expression |
Ctrl+F8 |
Toggle breakpoint |
Compile and Run |
|
Ctrl+F9 |
Make project |
Shift+F10 |
Run |
Shift+F9 |
Debug |
VCS/Local History |
|
Ctrl+K |
Commit project to VCS |
Ctrl+Shift+K |
Push commits |
- Shift+Shift
-
Press double shift to search everywhere. Type / IntelliJ IDEA will list the available groups of settings. Select the one you need and press Enter or type the settings name by prepending with # and press Enter Details
Tool Windows Keymap
Shortcut | Tool Window |
---|---|
Alt+1 |
Project |
Alt+2 |
Favourite |
Alt+3 |
Find |
Alt+4 |
Run |
Alt+5 |
Debug |
Alt+6 |
TODO |
Alt+7 |
Structure |
Alt+8 |
Services |
Alt+9 |
Git |
Alt+F12 |
Terminal |
F12 |
Jump to Last Tool Window |
Ctrl+Shift+F12 |
Hide All Tool Windows |
Live Templates
To see live templates in action, type live template shortcut (e.g psvm
) in your editor window and hit Tab.
Detail list of live templates are available under | .
Statement
Prints a string to System.out
System.out.println(myVariable);
Inserts 'if null' expression
if (myVariable == null) {
// code
}
Inserts 'if not null' expression
if (myVariable != null) {
//code
}
Create iteration loop
for (int i = 0; i < myVariable; i++) {
//code
}
Iteration according to Java SDK 1.5 style
for (String arg : args) {
}
Check object type with instanceof and downcast it
if (args instanceof Object) {
Object o = (Object) args;
//
}
Iterate elements of java.util.Collection
for (Iterator iterator = collection.iterator(); iterator.hasNext(); ) {
Object next = iterator.next();
}
Iterate elements of java.util.Iterator
while (iterator.hasNext()) {
Object next = iterator.next();
}
Iterate elements of java.util.List
for (int i = 0; i < list.size(); i++) {
Object (A) list.get(i);
//
}
Additional Resources
Watch
-
Pluralsight - Getting Started with IntelliJ CE by David Starr.
-
Duration 2h 47m.
-
Released 1 Sep 2017.
-