IntelliJ IDEA Cheatsheet
#
IntelliJ IDEA is a powerful Integrated Development Environment (IDE) for Java and other programming languages. It offers advanced features for coding, debugging, and project management.
Basic Navigation
#
Command/Option | Example | Description |
---|
Ctrl + N | Ctrl + N | Find class by name |
Ctrl + Shift + N | Ctrl + Shift + N | Find file by name |
Ctrl + Alt + Shift + N | Ctrl + Alt + Shift + N | Find symbol by name |
Shift | Shift | Search everywhere |
Ctrl + E | Ctrl + E | View recent files |
Ctrl + Tab | Ctrl + Tab | Switch between open files |
Editing Code
#
Command/Option | Example | Description |
---|
Ctrl + C | Ctrl + C | Copy selected text |
Ctrl + X | Ctrl + X | Cut selected text |
Ctrl + V | Ctrl + V | Paste text |
Ctrl + Z | Ctrl + Z | Undo |
Ctrl + Y | Ctrl + Y | Redo |
Ctrl + D | Ctrl + D | Duplicate line or selection |
Ctrl + / | Ctrl + / | Comment or uncomment line |
Ctrl + Shift + / | Ctrl + Shift + / | Comment or uncomment block |
Searching and Replacing
#
Command/Option | Example | Description |
---|
Ctrl + F | Ctrl + F search_term | Find text in the file |
Ctrl + R | Ctrl + R old_text | Replace text in the file |
Ctrl + Shift + F | Ctrl + Shift + F | Find in path |
Ctrl + Shift + R | Ctrl + Shift + R | Replace in path |
File Management
#
Command/Option | Example | Description |
---|
Ctrl + N | Ctrl + N | Create a new file or project |
Ctrl + S | Ctrl + S | Save file |
Ctrl + Shift + S | Ctrl + Shift + S | Save all files |
Ctrl + W | Ctrl + W | Close current editor tab |
Ctrl + Shift + W | Ctrl + Shift + W | Close all editor tabs |
Alt + Enter | Alt + Enter | Show intention actions and quick fixes |
Integrated Terminal
#
Command/Option | Example | Description |
---|
Alt + F12 | Alt + F12 | Open integrated terminal |
Ctrl + Shift + F12 | Ctrl + Shift + F12 | Maximize/minimize editor and tool windows |
Debugging
#
Command/Option | Example | Description |
---|
Shift + F9 | Shift + F9 | Debug |
F8 | F8 | Step over |
F7 | F7 | Step into |
Shift + F8 | Shift + F8 | Step out |
Ctrl + F2 | Ctrl + F2 | Stop debugging |
Alt + F9 | Alt + F9 | Run to cursor |
Refactoring
#
Command/Option | Example | Description |
---|
Ctrl + Alt + Shift + T | Ctrl + Alt + Shift + T | Refactor this |
Shift + F6 | Shift + F6 | Rename |
Ctrl + Alt + V | Ctrl + Alt + V | Extract variable |
Ctrl + Alt + M | Ctrl + Alt + M | Extract method |
Ctrl + Alt + F | Ctrl + Alt + F | Extract field |
Project Management
#
Command/Option | Example | Description |
---|
Ctrl + Shift + A | Ctrl + Shift + A | Find action |
Alt + F1 | Alt + F1 | Find file in project view |
Ctrl + F9 | Ctrl + F9 | Build project |
Ctrl + Shift + F9 | Ctrl + Shift + F9 | Compile selected files |
Miscellaneous
#
Command/Option | Example | Description |
---|
Ctrl + Shift + L | Ctrl + Shift + L | Show all key bindings |
Ctrl + Alt + L | Ctrl + Alt + L | Reformat code |
Ctrl + Shift + N | Ctrl + Shift + N | Open file by name |
Ctrl + Alt + Shift + S | Ctrl + Alt + Shift + S | Open project structure |
This cheatsheet covers essential IntelliJ IDEA commands and options to help you navigate, edit, and manage your projects efficiently in IntelliJ IDEA.