The Semigeek

Aldwin Jay Robledo  //  Peace!

Oct 2 / 6:50am

Eclipse Hotkeys and Shortcuts

    Many programmers using Eclipse are having a hard time editing simply because they are yet to use the IDE more efficiently. Here are most of the hotkeys and shortcuts I use and I would like to share these with you. I currently use Eclipse Ganymede, but I have been using these hotkeys since Eclipse 3.1. The hotkeys I use very commonly are the following:

Ctrl+Shift+O Organze imports. This saves you from people telling you to remove unnecessary imports and also obtains the import classes that you forgot to import. Import import import.

Ctrl+Q Go to last edited change. This is useful when you are browsing too much code in other files then forget what file you were currently working on and most importantly, what exact line and column you were.

Alt+Up or Alt+Down Move line up or down. Very useful when moving blocks of code around like putting it inside a loop or rearranging the program logic. Simply select the lines you want to move then use the hotkey.

Ctrl+Shift+T or Ctrl+Shift+R Open Type or Open Resource. Know the class name or the properties file name but forgot which project or package it resides in? Use this hotkey.

Alt+Shift+W, P Have 100+ classes in your project, and dont have time to memorize all names? Use this hotkey to show the the file you are currently working on in the Package Explorer.

Ctrl+D Erase current line. Pressing Home, another Home(to get the indentation spaces), Shift+End, Backspace is replaced by a hotkey.

 

And here are most of the other shortcuts I use (yes I use them all) when working in Eclipse:

Navigation
Last Edit Location Ctrl+Q
Backward History Alt+Left
Forward History Alt+Right
Go to Line number Ctrl+L
Go to Method Ctrl+O
Find Next Text Occurrence Highlight text to search then Ctrl+K
Find Previous Occurrence Highlight text then Ctrl+Shift+K
Go to Matching Bracket Ctrl+Shift+P
Open Type Ctrl+Shift+T
Open Resource Ctrl+Shift+R
Open Encapsulated Class Ctrl+T
Show Current Class in Package Explorer Alt+Shift+W, P
Activate Editor F12
Maximize/Restore Editor Pane Ctrl+Numpad Enter or Ctrl + M
Flip through tabs(opened files) Ctrl+PgUp/ Ctrl+PgDn
List opened tabs Ctrl+E
Select Perspective Ctrl+F8
Close All Open Editor Panes Ctrl+Shift+W


Editing
Toggle Comment Ctrl+/
Move Line/s Down Alt+Down
Move Line/s Up Alt+Up
Delete Current Line Ctrl+D
Insert Blank Line to Previous Line Ctrl+Shift+Enter
Insert Blank Line to Next Line Shift+Enter
Copy Line to Next Line Ctrl+Alt+Down
Copy Line to Previous Line Ctrl+Alt+Up
Organize Imports Ctrl+Shift+O
Auto Format Ctrl+Shift+F
To Upper Case Ctrl+Shift+X
To Lower Case Ctrl+Shift+Y


Running/debugging
Debug Java file Alt+Shift+D, J
Run Java file Alt+Shift+X, J


Miscellaneous
Content Assist Ctrl+Space
Quick Fix Ctrl+1
Toggle Breakpoint Ctrl+Shift+B
Toggle Mark Occurrences Alt+Shift+O
Display Available Eclipse Shortcuts Ctrl+Shift+L

0 comments

Leave a comment...

 
Got an account with one of these? Login here, or just enter your comment below.
Posterous-login    Connect    twitter