TOP 10 Eclipse Shortcuts
Posted by sureshkrishna on September 15, 2007
Most of us who are using eclipse for at least 1 year are familiar with the shortcuts. Its been quite challenging to know and remember all the shortcuts during the development time. And of course we dont need all of them. I have been collecting some shortcuts based on the user experiences and the way they develop software. Following TOP 10 Eclipse Shortcuts helps everyone in their happy day coding.
- Ctrl + Shift + O : Organize imports
- Ctrl + Shift + T : Open Type
- Ctrl + Shift + F4 : Close all Opened Editors
- Ctrl + O : Open declarations
- Ctrl + E : Open Editor
- Ctrl + / : Line Comment
- Alt + Shift + R : Rename
- Alt + Shift + L : extract to Local Variable
- Alt + Shift + M : extract to Method
- F3 : Open Declaration
Let me explain how i got these TOP 10 shortcuts.
- I start developing a plugin. As the development goes i want to refactor the code with “Alt + Shift + L” and “Alt + Shift + L” and “Alt + Shift + M“.
- And not i have many methods and probably 500+ lines of code in java file. A typical development involves commenting and uncommenting via “Ctrl + /” (Even though we have shortcuts for Block Commenting, looks like many developers use more of Ctrl + /).
- As we comment and uncomment and many more class references, we have so many imports that need to be cleaned. We do copy very often from one class to another class, now i want to organize my imports by “Ctrl + Shift + O“
- Now i want to find variable and method declarations via “Ctrl + O“.
- In the course of development i would like to view/analyze the declarations of the methods or classes via “F3″.
- All well till now, i want to use an interface/class and want to search for it via “Ctrl + Shift + T“.
- By the time we do all this we have too many editors opened and we would like to navigate among multiple open editors via “Ctrl + E“.
- And finally you feel frustrated with so many opened editors and want to close all of them via “Ctrl + Shift + F4“.
September 15, 2007 at 3:11 am
Egads, you forgot:
CTRL-3: Quick Access (to basically everything; I remap this to CTRL-` because it’s eassier to type one-handed)
CHTL-H: Search & Replace
ALT-SHIFT-X: Run As…
ALT-SHIFT-D: Debug As…
ALT-SHIFT-Q: Open View…
CTRL-TAB / SHIFT-CTRL-TAB: cycle open editors (actually, these are usually on *-F6 but I remap them)
September 15, 2007 at 5:10 am
Ok these are the TOP 15 (almost) shortcuts
September 15, 2007 at 6:50 am
You can add also
CTRL + . to go directly to the next warning or error in your current source file.
September 15, 2007 at 7:22 am
Alt + Shift + W : show the class in the package view.
I combine Ctrl+ Shift + T or Ctrl + shitft + R with it to avoid having to expand my packages.
September 15, 2007 at 4:06 pm
How can you miss Alt+Left or Alt+Right for navigation and Ctrl+Q for last edit as well as Ctrl+T for type hierarchy?? They are so much useful..
September 16, 2007 at 5:17 am
Nirav : OK these qualify for TOP 20 shortcuts.
September 16, 2007 at 4:30 pm
Does nobody use Ctrl-S?
“Save every thirty seconds!”
September 16, 2007 at 5:53 pm
The top 2 have to be Ctrl+1 and Ctrl+Space, and they’re not even on the list.
September 16, 2007 at 6:05 pm
Great list, and with just 10 hotkeys it is impossible to make everyone happy so everybody who says he forgot something, this is a top 10 and not top 100
Also, if you don’t like this list, I have written a similar article some time ago:
http://martin.ankerl.com/2006/07/20/top-10-eclipse-hotkeys/
September 16, 2007 at 8:13 pm
Oh….Thanks everyone for the inputs.
Disclaimer : “This is a TOP 10 Eclipse Shortcut list, and this does not mean that you can do entire SW development on Eclipse with these 10 Keys. They represent the 10 most frequently used shortcuts.”
September 17, 2007 at 7:48 am
[...] TOP 10 Eclipse Shortcuts Most of us who are using eclipse for at least 1 year are familiar with the shortcuts. Its been quite challenging to […] [...]
September 17, 2007 at 10:46 am
I have stopped using Ctrl+Shift+O (Organize imports) since the introduction of save participants. I guess Ctrl+S should be in the top 10 instead though.
September 17, 2007 at 3:05 pm
Ctrl + i to redo good indentation of the selected code.
September 17, 2007 at 9:49 pm
I really like Ctrl+F11 (Run last launched) or F11 (debug last launched)… It is perfect when I start a project, to see if those magic codes are really working properly
September 18, 2007 at 1:12 pm
You omitted THE MOST IMPORTANT ONES! The one that really make Eclipse development more enjoyable!!!!!! Ctrl+1 - THE QUICK FIX. It fixes a typical compile errors like no variable declaration, no initialization etc. !!! You should try this! It really accellerates the development!!
My faviorites’ number two and three are Ctr+ . Thanks to them you instantenoeusly jump to the place of the previous or next compile error.
September 19, 2007 at 2:58 am
control f, control-k, and control-w.
September 19, 2007 at 6:00 am
> You omitted THE MOST IMPORTANT ONES!
> The one that really make Eclipse development more enjoyable!!!!!!
> Ctrl+1 - THE QUICK FIX.
I have to agree to this.
September 19, 2007 at 6:16 am
Ok …i do agree that Ctrl + 1 is a contender to this.
Instead of Ctrl + Shift + O, Ctrl + 1 should be added.
September 20, 2007 at 10:45 am
I agree on the excellence of Ctrl+.
However, does anyone know how to make it jump to errors before jumping to warnings?
September 21, 2007 at 4:06 pm
[Ctrl] + [Space].
It displays code assistence window. It is the most used feature I use in Eclipse.
September 25, 2007 at 9:22 am
Or rather than going through this entire thread… use…
Ctrl + Shift + L & see all the shortcuts
October 7, 2007 at 10:24 am
[...] shortcut ระหว่างการแก้ไขซอร์สโค้ด บลอก TOP 10 Eclipse Shortcuts ของนาย Suresh Krishna เค้าสรุป 10 shortcut [...]
October 10, 2007 at 1:31 pm
[...] Zobowiązałem się dawać trackback do każdego wpisu przetłumaczonego. Oryginalną wersję tego postu znajdziecie tutaj. [...]
October 11, 2007 at 8:26 am
Oh God…we forgot The Most: CTRL + SHIFT + F
I forgave you.
January 11, 2008 at 12:33 pm
[...] you know Eclipse? Most programmers quickly learn the common keystrokes but never take advantage of all the shortcuts. Here are my favourite lesser-known [...]
January 22, 2008 at 12:13 pm
ssssssssssssssssssssssss
April 12, 2008 at 2:10 am
I would like to know what the shortcut for “Build” is. I am used to doing flash, and simply hitting CTRL+ENTER and soon as i type a new code block. I’m new to Eclipse, and so it aggravating to take my hands away from the keyboard to click “Build”, so that i can compile and test.
Thanx.