If you use eclipse, there are a few shortcuts that you should know about to improve your productivity.

Selecting Blocks of Text

⌘-Opt-A will put you into block select mode.  This allows you to select/edit/copy/paste any block of text (e.g. a column of text).

Search for and Open a File

Sometimes you know the file name (or part of it) that you want to open, but you cannot quickly find it in the navigation pane.  Use⌘-⇑-R to open a dialog that will allow you to enter part of a file name and provide options for completing it.

Refactor Mode

Have you ever been dissatisfied with the choice off a variable name or method name, but don’t want to go through the pain of doing a search/replace to change it?  Refactor mode takes the pain out of these kinds of changes. Select the variable/function/class name that you want to change and choose ⌘-Opt-R to enter refactor mode.  Make your changes and hit enter to refactor!

Macro Expansion

Have you ever become frustrated trying to do macro expansion in your mind?  Simply select the macro invocation and choose ⌘-= to expand the macro,

Open the Definition of a Type

If you want to quickly see the definition of a type (class, enum, typedef, etc.) you can simply select the type and use F3.

What is your favorite Eclipse shortcut?

Leave a note in the comments section below.

Categories: eclipse


Mike Hansen · September 23, 2016 at 4:03 PM

On a mac, Ctrl-space does autocomplete.

Mike Hansen · November 1, 2016 at 8:45 PM

To build/index with a particular language standard (for instance, C++11): Project -> Properties -> C/C++ Build -> Settings -> Tool Settings -> GCC C++ Compiler -> Dialect -> Language Standard: pick what you want here

Mike Hansen · November 1, 2016 at 8:47 PM

To customize key bindings: Preferences -> General -> Keys will show you the listing, click on one and change the ‘Binding’ entry

Installing Eclipse on OSX | Multiscale Modeling Software · November 10, 2015 at 3:31 PM

[…] Useful shortcuts in eclipse […]

Leave a Reply

Avatar placeholder