Catalog / IntelliJ IDEA Cheatsheet

IntelliJ IDEA Cheatsheet

A comprehensive guide to IntelliJ IDEA, covering essential shortcuts, features, and configurations to boost your productivity.

Navigation & Search

Basic Navigation

Ctrl+N (or Cmd+O on macOS)

Go to Class

Ctrl+Shift+N (or Cmd+Shift+O on macOS)

Go to File

Ctrl+Alt+Shift+N (or Cmd+Option+Shift+O on macOS)

Go to Symbol

Double Shift

Search Everywhere

Ctrl+B (or Cmd+B on macOS)

Go to Declaration

Ctrl+Alt+B (or Cmd+Option+B on macOS)

Go to Implementation(s)

Ctrl+U (or Cmd+U on macOS)

Go to Super-method/Super-class

Alt+Up/Down (or Option+Up/Down on macOS)

Go to previous/next method

Finding Usage & Structure

Alt+F7 (or Option+F7 on macOS)

Find Usages

Ctrl+Shift+F7 (or Cmd+Shift+F7 on macOS)

Highlight Usages in File

Ctrl+E (or Cmd+E on macOS)

Recent Files

Ctrl+Shift+E (or Cmd+Shift+E on macOS)

Recent Locations

Ctrl+H (or Cmd+H on macOS)

Class Hierarchy

Ctrl+Shift+H (or Cmd+Shift+H on macOS)

Method Hierarchy

Ctrl+Alt+U (or Cmd+Option+U on macOS)

Show UML Popup

Editing & Refactoring

Basic Editing

Ctrl+Space (or Cmd+Space on macOS)

Basic Code Completion

Ctrl+Shift+Space (or Cmd+Shift+Space on macOS)

Smart Code Completion

Ctrl+Alt+Space (or Cmd+Option+Space on macOS)

Cyclic Expand Word

Alt+Insert (or Cmd+N on macOS)

Generate Code (Getters, Setters, Constructors, etc.)

Ctrl+O (or Cmd+O on macOS)

Override Methods

Ctrl+I (or Cmd+I on macOS)

Implement Methods

Ctrl+Alt+T (or Cmd+Option+T on macOS)

Surround with (if, for, try/catch, etc.)

Ctrl+/ (or Cmd+/ on macOS)

Comment/Uncomment Line

Refactoring

Shift+F6

Rename

Ctrl+Alt+Shift+T (or Cmd+Option+Shift+T on macOS)

Refactor This

Ctrl+Alt+V (or Cmd+Option+V on macOS)

Introduce Variable

Ctrl+Alt+C (or Cmd+Option+C on macOS)

Introduce Constant

Ctrl+Alt+F (or Cmd+Option+F on macOS)

Introduce Field

Ctrl+Alt+M (or Cmd+Option+M on macOS)

Extract Method

Ctrl+Alt+P (or Cmd+Option+P on macOS)

Introduce Parameter

Code Assistance & Analysis

Inspections & Intentions

Alt+Enter (or Option+Enter on macOS)

Show Intention Actions and Quick Fixes

Ctrl+F1 (or Cmd+F1 on macOS)

Show Error Description at Caret

Ctrl+Alt+Shift+I (or Cmd+Option+Shift+I on macOS)

Inspect Code

Code Formatting & Arrangement

Ctrl+Alt+L (or Cmd+Option+L on macOS)

Reformat Code

Ctrl+Alt+I (or Cmd+Option+I on macOS)

Auto-Indent Line(s)

Ctrl+Shift+V (or Cmd+Shift+V on macOS)

Paste from History

Postfix Completion

Postfix completion transforms an existing expression based on the postfix you type after a dot.

Examples:
myVar.null expands to if (myVar == null)
myList.for expands to for (String item : myList)

Build, Run & Debugging

Running & Building

Ctrl+F9 (or Cmd+F9 on macOS)

Make Project

Ctrl+Shift+F9 (or Cmd+Shift+F9 on macOS)

Compile Selected File(s)

Alt+Shift+F10 (or Option+Shift+F10 on macOS)

Run Configuration

Alt+Shift+F9 (or Option+Shift+F9 on macOS)

Debug Configuration

Debugging

F9

Resume Program

Ctrl+F8 (or Cmd+F8 on macOS)

Toggle Breakpoint

Shift+F9

Debug

F8

Step Over

F7

Step Into

Shift+F8

Step Out

Alt+F9 (or Option+F9 on macOS)

Run to Cursor

Alt+F8 (or Option+F8 on macOS)

Evaluate Expression