Eclipse Shortcuts Cheat Sheet



Eclipse cheat sheet of all shortcuts and commands. Learn a new Dojo. Keyboard Shortcuts Eclipse 3.1 Emacs configuration Edit Content Assist Alt+/ In Dialogs and Windows. Run Eclipse Application Shift+Alt+X E In Windows. Cheat Sheets Shift+Alt+Q H In Windows Console Shift+Alt+Q C In Windows. Quick Access Ctrl + 3 - Quick Access allows to trigger everything Navigation Ctrl + Shift + R - Search dialog for resources Ctrl + Shift + T - Search dialog for Java Types Alt + ← - Go to previous opened editor Alt + → - Similar to Alt + ← but opens the next editor Ctrl + Q - Go to last edited position in editor Starting programs Ctrl + F11 - Run last launched. Cheat Sheets 1 2 3 1. To launch a cheat sheet in the Workbench window, select Help Cheat Sheets 2. From the Cheat Sheet Selection dialog box, select the cheat sheet you want to open 3. Follow the steps given in the cheat sheet to perform a particular task, such as Changing P&E Connections Setting. Eclipse CDT Keyboard Shortcuts Cheat Sheet by Etienne Savard pdf, png 300 dpi, png 600 dpi (symbiosoft.net) Getting Started with Eclipse RCP by James Sugrue pdf (refcardz.dzone.com) Eclipse Plug-in Development by James Sugrue pdf (refcardz.dzone.com).

Details Group Tabs

Details

Eclipse offers the possibility to export all keyboard shortcuts to a CSV file. kbd-cheatsheet is a small Python application to transform this CSV file into a PDF file. Apache FOP is needed to create the PDF files.

The shortcuts are grouped, sorted and arranged according to some user defined settings. Since the basis for the sheet is your current Eclipse installation, everybody can create their own specialized versions.

Apart from the application itself there are also some cheat sheets available.

  • Documentation,
  • Editor,
  • cheatsheet,
  • keys,
  • keyboard,
Additional Details
Metrics
DateRankingInstallsClickthroughs
April 2021NA0 (0%)12
March 2021NA0 (0%)8
February 2021NA0 (0%)8
January 2021NA0 (0%)15
December 2020NA0 (0%)8
November 2020NA0 (0%)12
October 2020NA0 (0%)8
September 2020NA0 (0%)8
August 2020NA0 (0%)9
July 2020NA0 (0%)6
June 2020NA0 (0%)5
May 2020NA0 (0%)9
Errors

Unsuccessful Installs in the last 7 Days: 0

Download last 500 errors (CSV)

When I use Eclipse I try and use shortcuts all the time. They really make me work faster and give me time to focus on getting the code out rather than slowing down to invoke IDE commands with the mouse.

Because people work differently and on different things, it’s important to manage keyboard shortcuts to suit the way you work. So it’s good that Eclipse makes it really easy to change shortcuts and also to view shortcuts for the commands you use a lot.

I’ll discuss how to change keyboard shortcuts, how to avoid conflicts with existing ones, why it’s a good thing to manage shortcuts and then end off with some examples of common shortcuts that you should add to you arsenal.

How do you manage keyboard shortcuts

The main preference page can be found under Window > Preferences > General > Keys (or faster: Press Ctrl+3, type Keys and press Enter). From here you can see all commands and assign/change their associated keyboard shortcuts. In the video, I’ll show you how to reassign a key. We’ll use this to assign Ctrl+Tab to switch to the next editor.

Notes:

  • You don’t have to copy a command to assign/reassign a shortcut. I just prefer to keep the old shortcut in case someone else wants to take over my keyboard and expects the shortcut to work.
  • All commands registered with Eclipse are listed on the Keys preference page. Browse through them or search to see if your favourite command is listed. If it doesn’t have a shortcut assigned, then assign one immediately.
  • The When dropdown on the dialog shows you in which context the command applies (eg. only when editing Java source). You can assign the same shortcut to two different commands, but if the context differs Eclipse will only execute the one command. I suggest you don’t change the context.
  • Notice that Eclipse shows you which keys conflict with the selected one if their in the same context.

Examples of useful keyboard shortcuts

Cheat

Before continuing the discussion, here are a couple of useful Eclipse keyboard shortcuts you should know. There are way too many shortcuts to list and you’ll come across the more useful ones in other tips.

ShortcutAction
Ctrl+1Quick Fix list (for resolving errors/warnings) and also Refactoring
Ctrl+SpaceDisplay the autocomplete list to select a relevant method/template, etc.
Ctrl+3Open Quick Access which allows you to run commands and navigate views and dialogs by searching for them, similar to Launchy on Windows or QuickSilver on Mac.
Ctrl+Shift+ROpen any resource in the workspace, eg. XML file, class file, etc.
Ctrl+Shift+TOpen a Java type, eg. a class or interface.
F3Go to the declaration of the method/class/variable
Ctrl+Shift+FFormat the selected code. If no code is selected, format the whole class.
F11/Ctrl+F11Debug/run the last launched application (see this tip for more information)
Ctrl+Alt+HDisplay all methods that call a method (call hierarchy)
F2Show JavaDoc for the current element (Shift+F2 shows external JavaDoc)
Alt+Up/Down, Alt+Shift+Down, Ctrl+DMove a line up/down, copy a line, delete a line (see this tip for more information)
Ctrl+/Comment/uncomment the current line or selected lines. You can be anywhere in the line, not necessarily at the beginning.

You can press Ctrl+Shift+L to get a list of registered keyboard shortcuts in the lower right corner. But for a complete list, I prefer to go to the preference dialog as I can see all commands that are registered, even if they don’t have shortcuts registered.

Eclipse Shortcuts Cheat Sheet

But all the keys are already taken

No, they’re not. Firstly, if a key you like is already taken then be creative. Use combos like Ctrl+Alt, Alt+Shift or even Alt+Shift+Ctrl (easier to press then you think). These aren’t used as often as Ctrl or Ctrl+Shift. You can sort by Binding to see which keys are already used.

Secondly, Eclipse allows you to assign a sequence of keystrokes to a command. Eg. Alt+Shift+X, J (that’s used to run the current class as a Java application) is invoked by pressing Alt+Shift+X, releasing the keys then pressing J. If you forgot your sequence shortcuts, just press the first part (eg. Alt+Shift+X), wait a second then Eclipse helps you out by listing all commands that have this keystroke as the first part of the sequence. The list appears in the lower right corner of the window. This works for any commands assigned a sequence of keystrokes.

Here’s an example of what you might see when you press the first sequence of keystrokes (notice the list in the lower, right corner). Tip: For custom commands you want to assign, use a well-known first keystroke to group your commands. For example, I use Alt+Shift+B (B for Byron) as my grouping prefix. This way there are fewer conflicts with existing shortcuts and Eclipse can show me a quick list if I forgot which keys I used.

So why bother managing keyboard shortcuts

Managing keyboard shortcuts in Eclipse is important because:

Eclipse Shortcuts Cheat Sheet
  • Not all Eclipse commands have assigned shortcuts. A command you frequently use could be assigned a shortcut. Eg. an SVN commit is registered as an Eclipse command but doesn’t have a keyboard shortcut assigned. Assigning one yourself will speed up checking in changes.
  • Sometime Eclipse gets it wrong. A good example is Ctrl+F6 for switching editors – Ctrl+Tab is a much more sensible option since the keys are close together and doable with one hand.
  • Going through the list of shortcuts may give you ideas for working faster or even show you a command you didn’t know Eclipse could do.

But don’t shortcuts take a long time to learn?

Keyboard Shortcuts Cheat Sheet Pdf

Cheat

Eclipse Shortcut Cheat Sheet

No ways! I often hear people complain that it takes too long to learn the shortcuts. I assure you that the 5 minutes it takes to learn the shortcut saves you hours, even days, of work over the months and years that you’ll be working on Eclipse. Here are some tips to get into and improve your keyboard usage:

  • Start by learning the shortcuts for the things you do often. Are you using the mouse a lot to launch applications or select code? Well, there’s a shortcut to launch apps and one to select code faster.
  • Keyboard shortcuts are often indicated next to menu items. Note them and try to use them instead of reaching for the mouse.
  • Learn to punish yourself when you reach for the mouse by undoing your action and forcing yourself to use the keyboard. This seems counterproductive (and harsh) at first, but it forces your brain to rewire itself so you’ll favour the shortcuts instead of the mouse the next time.
  • There is an Eclipse plugin called MouseFeed that shows you a keyboard alternative to a mouse click you performed. You can also configure it to cancel mouse clicks where a keyboard alternative is available, forcing you to use the keyboard in those instances. I don’t use it personally but what I’ve seen looks good. It definitely sounds like a good idea if you want to change your mousey ways and it relates nicely to my previous point.

Also keep this in mind: One of the easiest, surefire ways to work faster is to reduce the number of times you move your hands between the keyboard and mouse. The key is doing as much as possible with either one. For the mouse there are things like mouse gestures (if you’re on Windows, try StrokeIt). For the keyboard there are keyboard shortcuts and Eclipse has hundreds of them ready to make your life easier (also see the excellent AutoHotkey for other ways to boost your keyboard usage).

Related Tips

  • There are many other tips with useful shortcuts, so have a look and see if some might help you.

Share This Tip