Essential Shortcuts in Eclipse, Netbeans and IntelliJ IDEA

Here is a list with the most important shortcuts, divided in three sections:

All 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.

File Navigation

Function Eclipse Netbeans Idea
Delete a line Backspace or
E Backspace
Go to line L ctrl G L
Duplicate line Down or
Down or
Move up a line Up ctrl Up* Up
Move down a line Down ctrlDown* Down
Toggle uppercase X U then U U
Toggle lowercase Y U then L U
Move the cursor to the previous/next word Left
Move the cursor to the start/end of the line Left

* not working on OS X in the 8.0.2 NetBeans release


Function Eclipse Netbeans Idea
Search within a file ⌘ F
Search within a project ctrlH F
(select the project)
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
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)
(select the option to introduce local variable)
comment or uncomment a line or fragment of code Shift C Slash
(only on a keyboard with numeric pad)
Alt Slash