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
    • Key Promoter X plugin shows a popup notification with the corresponding keyboard shortcut whenever a command executed using the mouse. It also shows most used keymap statistics.

    • Presentation Assistant plugin shows a popup with the corresponding description whenever a keymap pressed. It can be very useful during presentation, screencast.

    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 Help  Keymap Reference.

    Most Used Keymaps

    Most used keymaps for productive development.

    Windows & Linux
    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

    Search everywhere

    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

    Insert Live Template

    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

    Windows &
    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 File  Settings  Editor  Live Templates.

    Declaration

    main() method declaration

    psvm / main
        public static void main(String[] args) {
                //code
        }

    Statement

    Prints a string to System.out

    sout
            System.out.println(myVariable);

    Inserts 'if null' expression

    ifn
            if (myVariable == null) {
                // code
            }

    Inserts 'if not null' expression

    inn
            if (myVariable != null) {
                //code
            }

    Create iteration loop

    fori
            for (int i = 0; i < myVariable; i++) {
                //code
            }

    Iteration according to Java SDK 1.5 style

    iter
            for (String arg : args) {
    
            }

    Check object type with instanceof and downcast it

    inst
            if (args instanceof Object) {
                Object o = (Object) args;
                    //
            }

    Iterate elements of java.util.Collection

    itco
            for (Iterator iterator = collection.iterator(); iterator.hasNext(); ) {
                Object next =  iterator.next();
    
            }

    Iterate elements of java.util.Iterator

    itit
            while (iterator.hasNext()) {
                Object next =  iterator.next();
    
            }

    Iterate elements of java.util.List

    itli
            for (int i = 0; i < list.size(); i++) {
                Object  (A) list.get(i);
                //
             }

    Additional Resources

    Watch