Eclipse IDE keyboard shortcuts

Eclipse IDE is a free, extensible development environment best known for Java, but widely used for C/C++, PHP and enterprise tooling. Its refactoring, navigation and debugging commands are all keyboard-driven, and learning them is the difference between fighting the IDE and flying through large codebases. This cheat sheet covers 63 default shortcuts for Windows and Mac.

General

Quick Access (find any command, view or setting)Ctrl+3Cmd+3
Show key assist (list all shortcuts)Ctrl+Shift+LCmd+Shift+L
New wizard (file, class, project)Ctrl+NCmd+N
SaveCtrl+SCmd+S
Save allCtrl+Shift+SCmd+Shift+S
Close editorCtrl+WCmd+W
Close all editorsCtrl+Shift+WCmd+Shift+W
Build allCtrl+BCmd+B

Navigation

Open Resource (any file by name)Ctrl+Shift+RCmd+Shift+R
Open Type (any class by name)Ctrl+Shift+TCmd+Shift+T
Open declarationF3F3
Quick outline of current fileCtrl+OCmd+O
Quick type hierarchyCtrl+TCmd+T
Open type hierarchy viewF4F4
Open call hierarchyCtrl+Alt+HCtrl+Option+H
Find references in workspaceCtrl+Shift+GCmd+Shift+G
Go to lineCtrl+LCmd+L
Go to matching bracketCtrl+Shift+PCmd+Shift+P
Back (navigation history)Alt+LeftCmd+[
Forward (navigation history)Alt+RightCmd+]
Last edit locationCtrl+QCtrl+Q
Next annotation (error/warning)Ctrl+.Cmd+.
Show hover tooltip / JavadocF2F2
Show In menu (Project Explorer, etc.)Alt+Shift+WCmd+Option+W

Editing

Content assist (code completion)Ctrl+SpaceCtrl+Space
Quick fix / quick assistCtrl+1Cmd+1
Delete lineCtrl+DCmd+D
Move line upAlt+UpOption+Up
Move line downAlt+DownOption+Down
Duplicate (copy) linesCtrl+Alt+DownCmd+Option+Down
Toggle line commentCtrl+/Cmd+/
Add block commentCtrl+Shift+/Cmd+Shift+/
Remove block commentCtrl+Shift+\Cmd+Shift+\
Correct indentationCtrl+ICmd+I
Convert selection to uppercaseCtrl+Shift+XCmd+Shift+X
Convert selection to lowercaseCtrl+Shift+YCmd+Shift+Y

Source & Refactoring

Format source codeCtrl+Shift+FCmd+Shift+F
Organize importsCtrl+Shift+OCmd+Shift+O
Add import for selected typeCtrl+Shift+MCmd+Shift+M
Source menu (getters, overrides, etc.)Alt+Shift+SCmd+Option+S
Refactor quick menuAlt+Shift+TCmd+Option+T
RenameAlt+Shift+RCmd+Option+R
Extract methodAlt+Shift+MCmd+Option+M
Extract local variableAlt+Shift+LCmd+Option+L
InlineAlt+Shift+ICmd+Option+I
MoveAlt+Shift+VCmd+Option+V

Search

Find / replace in fileCtrl+FCmd+F
Find nextCtrl+KCmd+K
Incremental findCtrl+JCmd+J
Open search dialog (file/Java search)Ctrl+HCtrl+H

Run & Debug

Run (last launched)Ctrl+F11Cmd+F11
Debug (last launched)F11F11
Toggle breakpointCtrl+Shift+BCmd+Shift+B
Step intoF5F5
Step overF6F6
Step returnF7F7
ResumeF8F8
Inspect selected expressionCtrl+Shift+ICmd+Shift+I

Editors & Views

Switch editor (quick list)Ctrl+ECmd+E
Next editorCtrl+F6Cmd+F6
Next viewCtrl+F7Cmd+F7
Next perspectiveCtrl+F8Cmd+F8
Maximize / restore editorCtrl+MCmd+M

Put your top Eclipse IDE shortcuts on real keys

The five Eclipse IDE actions most worth binding to a physical macropad key:

Ctrl+1Cmd+1 Quick Fix The highest-frequency command in Eclipse: fixes errors and offers refactorings everywhere.
Ctrl+Shift+RCmd+Shift+R Open Resource Jump to any file in the workspace in one press instead of digging through the explorer.
Ctrl+Shift+FCmd+Shift+F Format source code Run before every save and commit; a dedicated key makes clean diffs automatic.
Alt+Shift+RCmd+Option+R Rename refactor Safe project-wide renames are constant work in Java; awkward finger chord on the keyboard.
F8F8 Resume debugger Pressed dozens of times per debug session when stepping between breakpoints.

I hand-build small-batch programmable macropads (QMK/VIA) in Barcelona. One press, any shortcut, any app.

See the macropads

Eclipse IDE shortcut FAQs

How do I see all keyboard shortcuts in Eclipse?
Press Ctrl+Shift+L (Cmd+Shift+L on Mac) to open the key assist popup listing every binding. Press it twice to jump straight to the Keys preference page where you can rebind anything.
What is the most useful Eclipse shortcut?
Ctrl+1 (Cmd+1 on Mac), Quick Fix. It contextually fixes errors, creates missing methods, adds casts and offers refactorings, so many developers consider it the single highest-value key in Eclipse.
How do I open any file or class quickly in Eclipse?
Use Ctrl+Shift+R (Cmd+Shift+R) for Open Resource to find any file, and Ctrl+Shift+T (Cmd+Shift+T) for Open Type to find any Java class. Both support CamelCase filtering like NPE for NullPointerException.
Can I change keyboard shortcuts in Eclipse?
Yes. Go to Window > Preferences > General > Keys (Eclipse > Settings on Mac), where you can rebind any command or switch the whole scheme, including an Emacs scheme.
How do I format code automatically in Eclipse?
Press Ctrl+Shift+F (Cmd+Shift+F) to format the file or selection, and Ctrl+Shift+O (Cmd+Shift+O) to organize imports. Both use the formatter profile set in the project preferences.