30 March 2011

[Technote] Eclipse shortcut keys

To accelerate your programming speed on Eclipse, it's essential that you master the shortcut keys in Eclipse. Here I list a few shortcuts I found particularly useful:

Navigation shortcuts

CTRL+L - Jump to a line with line number x.
CTRL+Q - Go to the last edit location.
ALT+Left/Right - Same as CTRL+Q.
F3 - Go to the definition of a variable, method or class.
CTRL+O - Go to the declaration of a variable, method, or class.
CTRL+ALT+H - Show call hierarchy of a method.

File navigation shortcuts

CTRL+E - open a searchable list of all the open editors for you.
CTRL+SHIFT+T - Open a file by summon a file search box.

Editing shortcuts

CTRL+SHIFT+O - Doing all the imports automatically for you!
CTRL+I - Correcting indentation.
CTRL+/ - To comment out a line or lines (by selecting a group lines).
CTRL+D - To delete a line.
CTRL+SPACE (SHIFT+A in my IDE setting) - Autocomplete codes.
CTRL+1 - Suggest quick fixes.
ALT+SHIFT+R - Doing rename and refactoring for you.

Search shortcuts

CTRL+J - Incremental search.
CTRL+F - Single search.

Other shortcuts


CTRL+SHIFT+F - List all the shortcut keys and their mappings for you.

I will add more to this list once I find out other useful shortcuts.

No comments: