Eclipse Shortcuts That Every Programmer Should Know

By this time, you should be using some IDE to write your Java programs. Eclipse is one of the most popular IDE's and even though IntelliJ Idea is picking up steam in recent times, it is still not a bad idea to learn the below given Eclipse shortcuts as even Intellij supports Eclipse shortcuts in their IDE.

Learning these shortcuts is no longer optional but mandatory! These skills help you improve your productivity as a Developer and you should make every effort at all points to time to be more productive!

All Crtl to be replaced with Cmd for MacOS

Short cut Result Description
crtl+shift+f Formats the code Your code will be formatted as per the configured formatter. If nothing is configured, default formatter is used.
crtl+shift+o Removes unwanted imports If your code has import statements which are not used, they are removed
crtl+. Jumps to the first broken code when you want to tackle all the broken code segments, you would use this handy shortcut as it helps you by jumping from one broken to another with every Crtl+.
crtl+1 Quickfix suggestions popup is opened This command would be used typically after the previous one. Once you jump to the broken code segment, use this command to open the quickfix menu.
crtl+shift+r Opens resource search popup This command comes handy when you are searching for a class name but don't know which package it is hidden in. Once the search prompt opens up, key in the first few letters of your classname to get the search results
alt+shift+r Opens rename and refactor prompt First choose the entity to rename or refactor and then use this shortcut to help refactor or rename all the dependencies of this change globally.
crtl+f Opens Find and Replace popup This command helps you find and optionally replace some keyword with another keyword
crtl+shift+g Searches all references of this class/method This command helps you find where all the given class/method/variable is used in the given project.
crtl+right arrow Shifts the cursor to end of the line Useful to move the cursor quickly instead to going letter by letter
crtl+left arrow Shifts the cursor to beginning of the line Useful to move the cursor quickly instead to going letter by letter
crtl+down arrow Shifts the cursor to the of the file Useful to move the cursor quickly instead to going line by line
crtl+up arrow Shifts the cursor to beginning of the file Useful to move the cursor quickly instead to going line by line
crtl+d Delete the line Keep the cursor on the line to be deleted before using this shortcut

Some of the common shortcuts which are pretty universal across all IDE's and programs are

  • crtl+s - saves the file in context
  • crtl+a - selects all the text in a file in context
  • crtl+c - copies the selected text into the clipboard, typically used after using crtl+a
  • crtl+v - pastes the selected text from the clipboard, typically used after using crtl+c
  • crtl+z - undo what ever was just done before this command
  • crtl+shift+z - redo what ever was undone

results matching ""

    No results matching ""