03 July 2014

Eclipse keyboard shortcuts

Introduction to the dark art of Eclipse magic.

Ctr+Shift+L = Display all keyboard shortcuts

Ctr+M = maximises the current view
F4 = display type hierarchy

Ctr+Q = Take you back to your last edit
Alt+LEFT, Alt+RIGHT = navigate backwards and forwards on your last file views.
F3 or Ctr+CLICK = Take me to it's definition
Ctr+L = Jump to a specified line number
Ctr+E = Browse through a list of all the files that is opened in editor.

Ctr+F = Find/Search
Ctr+J = find as you type - incremental search
Ctr+Shift+R = Open a resource

Ctr+I = Indent code
Ctr+D = delete current line

Ctr+Shift+O = Organize imports
Alt+Shift+R = refactor - rename variable/method name.
Alt+Shift+S+R = refactor - generate getters and setters
Alt+Shift+M = refactor out a method

Play with these shortcuts. As you work on your IDE, there are frequent things you keep doing. Look for a keyboard shortcut for it. If you can't find it, then you search for it and create your own in the Preferences window. 
You can open it by Ctr+Shift+L and again Ctr+Shift+L. 

Something I made up
Ctr+Shift+F = File search

Happy typing.

Reference - http://web.stanford.edu/class/cs108/handouts132/10EclipseGuide.pdf