Essential Shortcuts in Eclipse, Netbeans and IntelliJ IDEA
Cheat Sheet with most important shortcuts in the popular IDEs Eclipse, Netbeans and IntelliJ IDEA to make your workflow more efficient
Make your life easier with these practical shortcuts in Eclipse, Netbeans and IntelliJ IDEA. The cheat sheet is divided in three sections, based on the usage:
- File navigation / working with files
- Search in the project / files
- Code assistance, code completion or parameter info
The shortcuts are for OS X, but in the most cases, the ⌘ key corresponds with Ctrl and ⌥ with the Alt key on Linux or Windows.
Files
| Function | Eclipse | Netbeans | Idea |
|-----------------------------------------------|---------------------------|-------------------------|--------------|
| Delete a line | ⌘ Backspace or ⌘ D | ⌘ E | ⌘ Backspace |
| Go to line | ⌘ L | ctrl G | ⌘ L |
| Duplicate line | ⌘ ⌥ Down or
⌘ ⌥ Up | ⇧ ⌥ Down or
⇧ ⌥ Up | ⌘ D |
| Move up a line | ⌥ Up | ⇧ctrl Up | ⇧⌥Up |
| Move down a line | ⌥Down | ⇧ctrl Down | ⇧⌥Down |
| Toggle uppercase | ⇧⌘X | ⌘U then U | ⇧⌘U |
| Toggle lowercase | ⇧⌘Y | ⌘U then L | ⇧⌘U |
| Move the cursor to the previous word | ⌥Left | ⌥Left | ⌥Left |
| Move the cursor to the next word | ⌥Right | ⌥Right | ⌥Right |
| Move the cursor to the start of the line | ⌘Left | ⌘Left | ⌘Left |
| Move the cursor to the end of the line | ⌘Right | ⌘Right | ⌘Right |
Search
| Function | Eclipse | Netbeans | Idea |
|----------------------------|---------------------------|---------------------------|----------------------------------|
| Search within a file | ⌘ F | ⌘ F | ⌘ F |
| Search within a project | ctrlH | ⇧⌘ F (select the project) | ⇧⌘ F |
| Search everywhere | ctrl H (select the scope) | ⇧⌘ F | Double-press ⇧ |
| Find class or file by name | ⇧ ⌘R | ⌘ O | ⌘ O or
Shift ⌘ O |
Code Assistance
| Function | Eclipse | Netbeans | Idea |
|-------------------------------------------------|-------------------------|-------------------------------------------------------------------------------------------|---------------------------------------------------------------|
| invoke code completion | ctrl space | ctrl space | ctrl space |
| Organize imports (Java) | Shift ⌘ O | Shift ⌘ I | Ctrl ⌥ O |
| assign value to a new variable | ⌘ 1 | ⌥ Enter
(select the option to create a new variable) | ⌥ Enter
(select the option to introduce local variable) |
| comment or uncomment a line or fragment of code |
⌥ ⌘ Slash
(only on a keyboard with numeric pad) | ⌘ Slash
Alt ⌘Slash |