Introduction
IntelliJ IDEA is a powerful integrated development environment (IDE) for Java and other JVM-based languages. It offers a wide range of features and shortcuts that can greatly enhance your productivity. Understanding and using these keyboard shortcuts can help you navigate the IDE more efficiently and perform tasks faster. This cheat sheet provides a quick reference to some of the most commonly used IntelliJ IDEA keyboard shortcuts.
IntelliJ IDEA Keyboard Shortcuts Cheat Sheet
Here’s a handy cheat sheet of the most commonly used IntelliJ IDEA keyboard shortcuts, ordered by their usage and popularity:
Shortcut (Windows/Linux) | Shortcut (macOS) | Description |
---|---|---|
Ctrl + N |
Cmd + O |
Find and open a class. |
Ctrl + Shift + N |
Cmd + Shift + O |
Find and open any file. |
Double Shift |
Double Shift |
Search everywhere (classes, files, symbols, actions). |
Alt + Enter |
Option + Enter |
Show intention actions and quick-fixes. |
Ctrl + Space |
Ctrl + Space |
Basic code completion (names of classes, methods, fields, and keywords). |
Ctrl + Shift + Space |
Cmd + Shift + Space |
Smart code completion (filters the list of methods and variables to match the expected type). |
Ctrl + P |
Cmd + P |
Show parameter info. |
Ctrl + Q |
Ctrl + J |
Quick documentation lookup. |
Shift + F6 |
Shift + F6 |
Rename. |
Ctrl + F |
Cmd + F |
Find in the current file. |
Ctrl + R |
Cmd + R |
Replace in the current file. |
Ctrl + Shift + F |
Cmd + Shift + F |
Find in path. |
Ctrl + Shift + R |
Cmd + Shift + R |
Replace in path. |
Ctrl + Alt + L |
Cmd + Option + L |
Reformat code. |
Ctrl + Alt + O |
Ctrl + Option + O |
Optimize imports. |
Ctrl + / |
Cmd + / |
Comment/uncomment with line comment. |
Ctrl + Shift + / |
Cmd + Shift + / |
Comment/uncomment with block comment. |
Ctrl + B |
Cmd + B |
Go to the declaration. |
Ctrl + Alt + B |
Cmd + Option + B |
Go to implementation(s). |
Ctrl + Shift + B |
Cmd + Shift + B |
Go to the type declaration. |
Ctrl + E |
Cmd + E |
View recent files. |
Ctrl + Shift + E |
Cmd + Shift + E |
View recently edited files. |
Ctrl + Shift + A |
Cmd + Shift + A |
Find action. |
Alt + 1 |
Cmd + 1 |
Focus on the Project tool window. |
Ctrl + Shift + F12 |
Cmd + Shift + F12 |
Toggle maximizing editor. |
Ctrl + Shift + Tab |
Ctrl + Shift + Tab |
Switch between tabs and tool window. |
Ctrl + F4 |
Cmd + W |
Close the active editor tab. |
Ctrl + D |
Cmd + D |
Duplicate the current line or selection. |
Ctrl + Y |
Cmd + Delete |
Delete the current line. |
Alt + Insert |
Cmd + N |
Generate code (getter, setter, constructor, etc.). |
Ctrl + Shift + V |
Cmd + Shift + V |
Paste from recent buffers. |
Ctrl + F12 |
Cmd + F12 |
File structure popup. |
Ctrl + U |
Cmd + U |
Go to super-method/super-class. |
Ctrl + H |
Cmd + H |
Open type hierarchy. |
Ctrl + Shift + U |
Cmd + Shift + U |
Toggle case for the selected text. |
Conclusion
Mastering IntelliJ IDEA keyboard shortcuts is essential for navigating the IDE efficiently and boosting your productivity. This cheat sheet provides a quick reference to some of the most commonly used shortcuts, helping you perform tasks faster and more effectively. Keep this guide handy to make the most of IntelliJ IDEA. Happy coding!