Search This Blog

May 7, 2012

Eclipse Shortcuts

 
a.       Content Assist  ------    “Alt + /” , this help to complete your content.
b.      Open Declaration  ----  “F3”,  jump to function, variable or macro declaration.
c.       Forward History  ---- “ALT + Right”, Move forward in the editor navigation history
d.      Backward History --- “ALT + Left”, Move backward in the editor navigation history
e.      Macro expansion. Move mouse cursor on any macro, it will shows fully expansion window of the macro, here is the snapshot.

f.        Open Call Hierarchy  --- “CTRL+ALT+H”. Here is the snapshot.

g.       The mother of all eclipse shortcuts --- “CTRL+SHIFT+L”.

Pressing Ctrl+Shift+L again will directly open the preference page where I can edit all the shortcuts. This is really the Mother of all shortcuts!

10 Best Eclipse Shortcuts
Yes, eclipse is a very visual and GUI oriented IDE. But this does not mean that everything is mouse oriented. While programming I have my hands on the keyboard. So I want to do as much as possible with shortcuts and the keyboard. The good news is that eclipse comes with a great set of helpers built-in. Here is my list of my favorite hotkeys and shortcuts…
  1. F3 — Jumps to include file or variable declaration/definition. If you want to use the mouse for this, press the Ctrl key and hover over the source with the mouse. Shortcut for Navigate > Open Declaration.
  2. Alt+Left and Alt+Right — Navigate through my source to back and forward. Shortcuts for Navigate > Back and Navigate > Forward and Backward.
  3. Ctrl+Space — Content assist which proposes methods/member variables and more based on my typing. Start typing with a. and it will show me the struct members. Shortcut for Edit > Content Assist:

CTRL+Space: Content Assist
  1. Ctrl+3 — Quick Access let me go to views, perspectives and more. Shortcut for Window > Navigation > Quick Access:
CTRL+3: Quick Access
  1. Ctrl+M — Maximizes the current view or editor. Press Ctrl+M again and it goes back to the previous size. Shortcut for Window > Navigation > Maximize Active View or Editor.
  2. Ctrl+Shift+/ — Insert block comment, remove it again with Ctrl+Shift+\. Shortcut for Source > Add Block Comment. Depending on your keyboard layout you might re-assign this short cut (e.g. if on your keyboard ‘/’ is only reached with the Shift key).
  3. Ctrl+Shift+T — Open an element with wildcard support. Shortcut for Navigate > Open Element:

Ctrl+Shift+T: Open Element
  1. Ctrl+F7— Switch to next view. Pressing again Ctrl+F7 let you iterate to the next view. Use Ctrl+Shift+F7 for previous view. Shortcut for Window > Navigation > Next View:

Ctrl-F7: Views
  1. Ctrl+Alt+h — Opens the call hierarchy. Shortcut for Navigate > Open Call Hierarchy:

Ctrl+Alt+h: Call Hierarchy
  1. Ctrl-O — Open the Quick Outline View. Shortcut for Navigate > Quick Outline:

Ctrl+O: Quick Outline View
If you do not like the shortcuts (or key bindings): go to Window > Preferences > General > Keys and change the bindings:

Key Bindings

No comments: