I absolutely love working with Intellij IDEA. I switched from Eclipse to Intellij ~4 years ago and have never looked back. Its fast, smart and a boon for productivity. I endorse it profusely to my team (as if I am being paid money for it; I don’t). Yes, they all tease me about it :)
I have created few videos of my most frequently used shortcuts. Hope it helps you.
All the shortcuts discussed in the video are listed below. Printable PDF version can be downloaded here
JetBrains’s list of suggested shortcuts can be found here (PDF)
Working with Panels
Action | Shortcut |
---|---|
Toggle Open/Close of Project Panel | Alt + 1 |
Toggle Open/Close of Run Panel | Alt + 4 |
Toggle Open/Close of Debug Panel | Alt + 5 |
Toggle Open/Close of Version Control Panel | Alt + 9 |
Take cursor back to Editor | Esc |
Minimize current panel and take cursor back to Editor | Shift + Esc |
Open Terminal | Alt + F12 |
Open Next Project Window | Alt + Ctrl + [ |
Open Previous Project Window | Alt + Ctrl + ] |
Expand Bottom Panel Size | Ctrl + Shift + Up |
Shrink Bottom Panel Size | Ctrl + Shift + Down |
Expand Left Panel Size | Ctrl + Shift + Right |
Shrink Left Panel Size | Ctrl + Shift + Left |
Working with Files
Action | Shortcut |
---|---|
Open a class | Ctrl + N |
Open a file | Ctrl + Shift + N |
Open anything (class, file, symbol) | Double + Shift |
Open Recent Files (partials, abbreviations and wildcards) |
Ctrl + E |
Open Recently Edited Files | Ctrl + Shift + E |
Create new file/package. | Alt + Ins (within project panel) |
Working with Java Code
Action | Shortcut |
---|---|
Find Action | Ctrl + Shift + A |
Open suggested solutions for errors | Alt + Enter |
Move between errors | F2 |
Rename variable/method/class | Shift + F6 |
Autocomplete | Ctrl + Shift + Enter |
Autocomplete suggestions | Ctrl + Space |
Smart Autocomplete | Ctrl + Shift + Space |
Comment / Uncomment | Ctrl + / |
Extract Variable | Alt + Ctrl + V |
Extract Field | Ctrl + Alt + F |
Extract Method | Ctrl + Alt + M |
To replace existing word instead of appending | Tab |
Split into variable and declaration | Alt + Enter |
Join lines. | Ctrl + Shift + J |
Organize imports | Ctrl + Alt + O |
Format code | Ctrl + Alt + L |
Template for iterating | iter |
Template for for-loop | fori |
Template for main method | psvm |
Templates for if null and if not null | ifn, inn |
Templates for System.out and System.err print | sout, serr |
Show Parameters | Ctrl + P |
Navigate to declaration (variable) or open class | Ctrl + B |
Show usages of class | Alt + Ctrl + F7 |
Override parent methods | Ctrl + O |
Display all methods of class | Ctrl + F12 (press Ctrl + F12 again to show super class) |
Move between methods | Alt + Up/Down arrow |
Text Editing
Action | Shortcut |
---|---|
Find Action | Ctrl + Shift + A |
w/ New Scratch Buffer | |
w/ Change File Language | |
Format | Ctrl + Alt + L |
Move one Word at a time | Ctrl + Left/Right |
Delete one Word at a time | Ctrl + Backspace |
Move line | Alt + Shift + Up/Down |
Delete Line | Ctrl + Y |
Duplicate Line | Ctrl + D |
Join Lines | Ctrl + Shift + J |
Clone Caret Below (custom shortcut) | Ctrl + Shift + X |
Select Next occurrence | Alt + J |
Select All occurrences | Ctrl + Shift + Alt + J |
Expand Selection | Ctrl + W |
Shrink Selection | Ctrl + Shift + W |
Toggle Case | Ctrl + Shift + U |
Find | Ctrl + F |
Replace | Ctrl + R |
Alt + P to replace selected | |
Alt + A to replace all | |
Find in Project | Ctrl + Shift + F |
then Tab, then Enter to open |
Working with Run/Debug
Action | Shortcut |
---|---|
Run Menu | Ctrl + Shift + F10 |
Run last app | Shift + F10 |
Debug Menu | Ctrl + Shift + F9 |
Debug last app | Shift + F9 |
Toggle Breakpoint | Ctrl + F8 |
Continue execution (until next debug) | F9 |
Next statement | F8 |
Go inside method | F7 |
Restart | Ctrl + F5 |
Force Stop | Ctrl + F2 |
Reload | Ctrl + F9 |
Conclusion
That’s it. Learning about only ~80 shortcuts will help you code much much faster and you will hardly have to use the mouse.
Start slow, maybe with 5 or 10 shortcuts and ramp up from there. If you forget a shortcut, use Ctrl + Shift + A to open Action
window and type in your command instead of using the mouse.
Slowly they all become muscle memory. I promise.
Happy coding!
Tags: intellij idea development