Open In App

Most Used Eclipse Keyboard Shortcuts That Every Java Developer Should Know

Last Updated : 06 Feb, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Java is a popular programming language, created in 1995 by James Gosling. It is owned by Oracle, and more than 3 billion devices run Java. it is one of the most preferred languages used for development in industries. To develop such applications, IDEs come into the picture. Eclipse is the most used Java development IDE, and knowing Eclipse shortcuts improves your productivity and makes you more efficient.

This tutorial is about the Top Best Eclipse keyboard shortcuts every Java developer should learn. This can drastically improve your productivity and you can perform your job better. Using keyboard shortcuts also helps impress colleagues and shows that you have a good grasp of the tools you used for Java Development.

Eclipse Shortcuts for Quick Navigation

1.  Ctrl + o for quick outline going quickly to a method.
2. Alt + Shift + W to show a class in the package explorer.
3. Alt + right and Alt + left for going back and forth while editing.
4. Ctrl + k or Ctrl + Shift +K  for finding the next/previous.
5. Go to a type declaration: F3 to see function definitions very quickly.
6.  Ctrl + Shift + Up and down for navigating from member to member (variables and methods)

Eclipse Shortcuts for Writing and Editing Code

1. Ctrl + / for commenting, uncommenting lines, and blocks.
2. Ctrl + Shift + /  for commenting, uncommenting lines with block comments.
3. Ctrl + l go to the line.
4. Ctrl + F4 or Ctrl + w for closing the current file.
5. Ctrl+Shirt+W for closing all files.
6. Ctrl + F for find/replace.
7.  Select text and press Ctrl + Shift + F for formatting
8. Ctrl + D to delete a line.
9. Ctrl + Q for going to the last edited place.
10. Selecting class and pressing F4 to see its Type hierarchy.

Miscellaneous Eclipse Shortcuts

1. Ctrl + Shift + T  for finding classes even from the jar files.
2.  Ctrl + 1 for a quick fix.
3. Ctrl + Shift + R  for finding any resource (file) including config XML files.
4. Ctrl + Shift + o for organizing imports.
5. Ctrl+Shift+G which searches the workspace for references to the selected method or variable.
6. Ctrl+Shift+L to view the listing for all Eclipse keyboard shortcuts.
7. Ctrl+Shift+P to find a closing brace. Place the cursor at the opening brace and use this.
8. Ctrl + Shift +F for Autoformatting.
9. Alt + Shift + j to add Javadoc at any place in the Java source file.
10. Alt+Shift+X, Q to run the Ant build file using keyboard shortcuts in Eclipse.
11. Alt + ← and Alt + → Hop back and forth respectively through the files you have visited.
12. Ctrl + E Go to other open editors.
13. Ctrl + T for toggling between supertype and subtype.
14. Move one problem (i.e.: error, warning) to the next (or previous) in a file:-

Ctrl +. 

Ctrl +, 

For next.

for the previous problem.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads