Eclipse is a popular integrated development environment (IDE) used by many programmers and software engineers especially for Java development. Learning keyboard shortcuts in Eclipse can significantly improve your productivity.
Below is a list of some essential Eclipse shortcuts that every programmers and developers must know:
Table of Contents
General Shortcuts
- Ctrl + S – Save
- Ctrl + Z – Undo
- Ctrl + Y – Redo
- Ctrl + C – Copy
- Ctrl + X – Cut
- Ctrl + V – Paste
- Ctrl + D – Delete line
- Ctrl + / – Comment/uncomment code
- Ctrl + Shift + / – Surround with block comment
- Ctrl + Shift + * – Go to matching bracket
- Ctrl + Shift + F – Format code
- Ctrl + Shift + O – Organize imports
- Ctrl + 1 – Quick fix (context-sensitive)
- Ctrl + 3 – Quick access (search for commands, files, etc.)
- Ctrl + F6 – Switch between open editors
- Ctrl + Tab – Switch between open editors (cycle)
- Ctrl + F7 – Switch between views (e.g., Package Explorer, Outline)
- Ctrl + E – Open recent files
- Ctrl + F8 – Toggle breakpoint
- Ctrl + F11 – Run last launched application
Navigation Shortcuts
- Ctrl + Shift + T – Open type (class) by name
- Ctrl + Shift + R – Open resource (file) by name
- Ctrl + G – Go to line
- Ctrl + L – Go to line
- Ctrl + O – Open method or member (within the editor)
- Ctrl + F3 – Show outline (in the editor)
- Ctrl + F4 – Close editor
- Ctrl + F12 – Show editor (maximize/restore)
- Alt + Left/Right – Navigate backward/forward
- F3 – Go to declaration
- Ctrl + . – Next error/warning
- Ctrl + , – Previous error/warning
Code Generation Shortcuts
- Ctrl + 1 – Quick fix (context-sensitive)
- Ctrl + Space – Content assist (code completion)
- Alt + Shift + R – Rename refactoring
- Alt + Shift + M – Extract method refactoring
- Alt + Shift + L – Extract local variable refactoring
- Alt + Shift + C – Change method signature refactoring
Debugging Shortcuts
- F5 – Step into
- F6 – Step over
- F7 – Step return
- F8 – Resume
- F9 – Run to line
- Ctrl + Shift + B – Toggle breakpoint
- Ctrl + F5 – Restart
- F11 – Debug last launched
- Ctrl + Shift + F11 – Run to line
These are some of the most commonly used shortcuts in Eclipse. Like IntelliJ IDEA, Eclipse has an extensive set of keyboard shortcuts covering various aspects of development. You can explore and customize these shortcuts in the Eclipse preferences. Depending on your specific workflow and needs, you may find it useful to modify or add additional keyboard shortcuts.