These are just a few of the many shortcuts available in IntelliJ IDEA, but they are some of the most commonly used ones. Using shortcuts can greatly improve your productivity and efficiency when developing in IntelliJ IDEA.
Here’s a table of some commonly used IntelliJ IDEA shortcuts:
Shortcut | Description |
---|---|
Ctrl + N | Open a class |
Ctrl + Shift + N | Open a file |
Ctrl + Shift + Alt + N | Create a new file |
Ctrl + Alt + L | Reformat code |
Ctrl + D | Duplicate a line |
Ctrl + X | Cut a line |
Ctrl + C | Copy a line |
Ctrl + V | Paste a line |
Ctrl + Z | Undo last action |
Ctrl + Shift + Z | Redo last action |
Ctrl + / | Comment/uncomment a line of code |
Ctrl + Shift + / | Comment/uncomment a block of code |
Ctrl + F | Find text |
Ctrl + Shift + F | Find text in all files |
Ctrl + R | Replace text |
Ctrl + Shift + R | Replace text in all files |
Ctrl + Shift + F7 | Highlight occurrences of selected text |
Ctrl + B | Go to declaration of a variable or method |
Ctrl + Alt + B | Go to implementation of an interface or abstract class |
Ctrl + Shift + I | Inspect code |
Ctrl + Alt + L | Optimize imports |
Ctrl + Space | Invoke code completion |
Alt + Enter | Show intention actions |
Ctrl + Shift + Enter | Complete a statement |
Shift + F6 | Rename a variable or method |
Ctrl + Alt + M | Extract a method |
Ctrl + Alt + V | Extract a variable |
Ctrl + Alt + F | Extract a field |
Ctrl + Shift + T | Create a new test |
Shortcuts for Java Development
Some more IntelliJ IDEA shortcuts that are useful for Java development:
Shortcut | Description |
---|---|
Ctrl + Shift + T | Navigate to test |
Ctrl + Shift + F10 | Run a test or application |
Ctrl + Shift + F9 | Debug a test or application |
Ctrl + Shift + A | Find an action or setting |
Alt + Insert | Generate code |
Ctrl + O | Override a method |
Ctrl + I | Implement an interface |
Ctrl + F12 | Show the file structure |
Alt + F7 | Find usages of a variable or method |
Ctrl + F7 | Find usages of a variable |
Ctrl + Alt + F7 | Find usages of a method |
Ctrl + Alt + H | Show call hierarchy |
Ctrl + Shift + Alt + T | Refactor code |
Ctrl + Shift + F6 | Change method signature |
Ctrl + Shift + U | Toggle case |
Ctrl + W | Select the current word |
Ctrl + Shift + W | Unselect the current word |
Ctrl + Alt + L | Show project files |
Ctrl + Shift + Alt + S | Open project settings |
Download PDF with IntelliJ Idea Shortcuts