IntelliJ IDEA is a powerful integrated development environment (IDE) for Java, Spring Boot and other programming languages and framework. While working on any IDE, Keyboard shortcuts is very important things and it can significantly improve your productivity.
Below are the list of some essential IntelliJ IDEA shortcuts that programmers and developers should know:
General Shortcuts
- Ctrl + S – Save
- Ctrl + Z – Undo
- Ctrl + Shift + Z (or Ctrl + Y) – Redo
- Ctrl + C – Copy
- Ctrl + X – Cut
- Ctrl + V – Paste
- Ctrl + D – Duplicate line or selection
- Ctrl + Delete – Delete to end of word
- Ctrl + Backspace – Delete to start of word
- Ctrl + Shift + F – Reformat code
- Ctrl + Alt + L – Reformat code (on selected code)
- Ctrl + Alt + O – Optimize imports
- Ctrl + Alt + I – Auto-indent lines or selection
- Ctrl + / or Ctrl + Shift + / – Comment/uncomment code
- Ctrl + Shift + Enter – Complete current statement
- Ctrl + Space – Basic code completion
- Ctrl + Shift + Space – Smart code completion
- Ctrl + B – Go to declaration
- Ctrl + Click – Go to declaration (mouse click)
- Ctrl + Alt + B – Go to implementation
- Ctrl + F12 – File structure popup (to navigate methods, fields, etc.)
- Ctrl + N – Find class by name
- Ctrl + Shift + N – Find file by name
- Ctrl + E – Recent files popup
- Ctrl + Shift + E – Recent edited files popup
- Ctrl + Shift + F12 – Maximize/restore editor window
- Ctrl + Tab – Switch between open tabs
- Ctrl + Alt + Left/Right – Navigate back/forward in code
- Ctrl + F4 – Close active editor tab
- Ctrl + Shift + W – Close all editor tabs
- Ctrl + W – Close current editor tab
- Ctrl + Shift + T – Refactor this
- Ctrl + Alt + V – Extract variable
- Ctrl + Alt + M – Extract method
- Ctrl + Alt + C – Extract constant
- Ctrl + Alt + P – Extract parameter
Navigation Shortcuts
- Ctrl + F – Find
- Ctrl + R – Replace
- Ctrl + G – Go to line
- Ctrl + H – Find usages
- Ctrl + Shift + H – Show usages in a tool window
- Ctrl + F7 – Highlight usages in file
- Ctrl + Alt + F7 – Show usages (in a popup)
- Alt + F7 – Find usages of a method or class
- Ctrl + Shift + F7 – Highlight usages in the current file
Code Generation Shortcuts
- Alt + Insert – Generate code (getters, setters, constructors, etc.)
- Ctrl + O – Override methods
- Ctrl + I – Implement methods
- Alt + Enter – Show intention actions and quick fixes
Debugging Shortcuts
- F9 – Resume program
- F8 – Step over
- F7 – Step into
- Shift + F7 – Smart step into
- Shift + F8 – Step out
- Ctrl + F2 – Stop
- Ctrl + F9 – Make project
- Ctrl + F8 – Toggle breakpoint
- Ctrl + Shift + F8 – View breakpoints
These are some of the most commonly used shortcuts in IntelliJ IDEA. Depending on your specific use case and workflow, you may find additional shortcuts useful. You can always explore IntelliJ’s keymap settings to customize shortcuts or discover more specific actions. To do this, you can go to “File” > “Settings” (or “IntelliJ IDEA” > “Preferences” on macOS), then search for “Keymap” in the settings search bar.