What is your favorite Eclipse hotkey?

I have been using Visual Studio with Re-Sharper for the past few years and recently performed in the Java store where we use Eclipse. Googling for hotkeys Eclipse returned a bunch of "Top 10 hotkeys", but more on that.

What are your favorite hotkeys? And what is significant?

+49
java eclipse hotkeys
Sep 19 '08 at 0:09
source share
25 answers

These are the ones that I write in “muscle memory”.

Editing

  • Ctrl + Shift + O - organize import (removes unused imports, adds missing imports, sorts imports)
  • Ctrl + Shift + I - unindent selection
  • Ctrl + / - comment / uncomment selected lines
  • Alt + Shift + R - select rename

Navigation

  • Ctrl + Shift + T - find as you enter Java classes in your projects
  • Ctrl + Shift + R - find as you type all the resources in your projects
  • Alt + Left - a step back in the history of editing
  • Alt + Right - a step forward in the history of editing

Execution

  • Ctrl + F11 - run again
  • F11 - run again in debug mode
+29
Sep 19 '08 at 0:20
source share

ctrl + space : automatic completion. Completes everything, including the kitchen sink.

The best ever!

+19
Sep 19 '08 at 0:32
source share

Ctrl + 3 - Quick Access

Quick access provides access to almost any kind, perspective, menu item, simply by typing it. This is great, which allows you to keep your hands on the keyboard and away from the mouse.

+16
Sep 19 '08 at 1:08
source share

Ctrl - Shift - F to format the code! :)

Along with Ctrl - Shift - O , I always do this before saving or committing. Together, these two shortcuts help keep everything clean and consistent.

By the way, there is more good stuff .

+14
Sep 19 '08 at 1:03
source share

Ctrl + 1 - suggestions and quick fixes. Try this as follows, write a call to any method, press the combination and voila! you eclipse declares a variable for you of the appropriate type. Another is the block press mark of Ctrl + 1, and extracting a local variable appears as the first option.

Ctrl + q - go to the last edited place.

+13
Sep 19 '08 at 2:08
source share

Alt + Shift + Z = "Surround With"

Select a code block and press this hotkey to open a small menu to create a try-catch block, conditional or loop.

+10
Sep 22 '08 at 10:44
source share

Holding CTRL so that you can click on class names and go to that class is probably the shortcut I use the most

(other than saving, copying ... as David says)

+8
Sep 19 '08 at 0:15
source share
  • Ctrl - space Auto Complete
  • F3 Open definition: go to the definition of a class, method, variable, even if it is in remote places (for example, classes in the JDK itself)
  • Ctrl - Shift - T Search Type: also finds Java classes that do not have their own files (such as classes in jar files). Note that you can use CamelCase: type NPE instead of NullPointerException.
  • Ctrl - Shift - R Find resource: opens any file. Much faster than trying to go to them.
  • Ctrl - Z Undo: Eclipse can undo a lot (e.g. restore files) and has a very long undo buffer for its text editors
+5
Sep 19 '08 at 0:39
source share

Each of @ insin and more:

Control - 1 : he offers solutions.
Alt - Shift - M. Creates a new method.
Alt - Shift - I : built-in variables / methods.
Control - 2 , L : creates a variable declaration.
Control - 2 , F. Creates a field declaration.
Control - O (not zero, but vocals) : shows the outline of the document.
F4 : shows the hierarchy.
Alt - Shift - Q , Q , P , T ... : displays the view.
Alt - Shift - W : shows.
Alt - Shift - ArrowUp . Previous method.
Alt - Shift - ArrowDown : next method.
Control - Shift - E : displays a dialog with a line for each open editor.
Control - E : displays the editor selection mini-window.

I use them every day!

I do not use Control - Shift - O and Control - Shift - I , because I activated "Save Actions", and they are automatically executed when saving documents.

Sorry, there are more than 10 of them.
Of course, in a few minutes I will remember other shortcuts :-)

+4
Sep 19 '08 at 9:51
source share

CTRL - SHIFT - R to go to the file - this is necessary for large projects

+2
Sep 19 '08 at 0:13
source share

Ctrl + Shift + F (Code Format) is pretty much the one I use the most.

This is also one of the reasons I prefer to work with Java in Eclipse than with C # in Visual Studio (although I use it as much as possible) - the formatting of C # code is rather weak.

+2
Sep 19 '08 at 4:05
source share

F3 is only mentioned once, but F3 along with CTRL + Shift + T is the most useful shortcut.

When you press F3, the cursor goes to the definition of the token on which the cursor was located.

+2
Sep 22 '08 at 9:07
source share

Ctrl + 7 - Comment / uncomment the selected code.

Ctrl + D - deletes the selected line.

syso + Ctrl + SPACE - creates: System.out.println ();

+2
Oct 10 '08 at 7:47
source share

A note on ctrl - O : Entering once will only give you the current outline of the class. Clicking on it of the second type will give you all the inherited things - often much more useful.

The same thing about ctrl - T : as soon as you give you supertypes, twice you will also need to provide interfaces.

+2
Oct 17 '08 at 23:33
source share

Besides the wonderful ones already mentioned:

CTRL + SHIFT + L - gives a short link to Eclipse hotkeys (at least in Galileo Java EE)

CTRL + M - Maximize Page

CTRL + 2 - Various quick help tips - (be patient with this hotkey combination, as there is a deft delay in front of the assistant)

CTRL + F3 - (once - Show class methods and variables)

CTRL + F3 - (double-click this hotkey combination to see inherited elements and methods)

+2
Nov 30 '09 at 22:53
source share

Ctrl + Q - return to the last place of editing.

+2
Jun 08 2018-11-11T00:
source share

ARROW CTRL-ALT-UP / DOWN to copy a row or selection is pretty cool. And one I miss Netbeans, so if someone knows the equivalent ...

+1
Sep 19 '08 at 0:19
source share

CTRL - SHIFT - T Enter a class name. Comes with a search, .. and * are wildcards. You can look for Java built-in classes (if you tell Eclipse about you jdk instead of your jre.).

Extremely useful for developing Java, if only to find this special-purpose class that eludes your mind.

+1
Sep 19 '08 at 0:23
source share

Ctrl + Shift + M - Add import . Love to see red underscores disappear.

+1
Sep 19 '08 at 2:16
source share

Ctrl + F6 : switch editors

Ctrl + F7 : switch views

Ctrl + F8 : switch perspectives

+1
Sep 19 '08 at 3:58
source share

Ctrl - Shift - T. Especially after you discover that you only need to type in the capital letters of the class name. To quickly find the MyLongClassName class, I just need to type Ctrl - Shift - T , M , L , C , N

+1
Sep 19 '08 at 21:46
source share

Alt + Arrow Up or Down - Move the current line / selection up or down

+1
Oct 17 '08 at 23:31
source share

alt + shift + S, then r is for creating getters and setters. It looks complicated, but once you get used to this combination, you cannot live without it.

+1
Jul 01 '09 at 21:30
source share

Alt + Shift + Q - show view

Alt + Shift + W - show in

Alt + Shift + Up - select the current word

Ctrl + K - find the next [using the selected word]

Ctrl + Shift + R, Enter - opens a file with the selected name (after selecting a word / file name in the editor)

Alt + H (customizable) - to switch (show / hide) the toolbar

+1
Jun 18 '11 at 11:51 on
source share

Ctrl - Shift - I (or something else on the PC): Automatically indent.

0
Oct 17 '08 at 23:34
source share



All Articles