Sciology = Science + Technology

Commonsense in Technology

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.

  1. Ctrl + Shift + O : Organize imports
  2. Ctrl + Shift + T : Open Type
  3. Ctrl + Shift + F4 : Close all Opened Editors
  4. Ctrl + O : Open declarations
  5. Ctrl + E : Open Editor
  6. Ctrl + / : Line Comment
  7. Alt + Shift + R : Rename
  8. Alt + Shift + L : extract to Local Variable
  9. Alt + Shift + M : extract to Method
  10. 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“.
Advertisements

63 Responses to “TOP 10 Eclipse Shortcuts”

  1. Nick Boldt said

    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)

  2. Ok these are the TOP 15 (almost) shortcuts 🙂

  3. Fred said

    You can add also

    CTRL + . to go directly to the next warning or error in your current source file.

  4. 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.

  5. 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..

  6. Nirav : OK these qualify for TOP 20 shortcuts.

  7. Görge said

    Does nobody use Ctrl-S?

    “Save every thirty seconds!”

    😉

  8. The top 2 have to be Ctrl+1 and Ctrl+Space, and they’re not even on the list.

  9. 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/

  10. 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.”

  11. […] 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 […] […]

  12. Nikolay said

    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.

  13. MrStrike said

    Ctrl + i to redo good indentation of the selected code.

  14. Preco said

    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

  15. mojojojo_ said

    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.

  16. davidm said

    control f, control-k, and control-w.

  17. Sha Jiang said

    > 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.

  18. Ok …i do agree that Ctrl + 1 is a contender to this.
    Instead of Ctrl + Shift + O, Ctrl + 1 should be added.

  19. Emma said

    I agree on the excellence of Ctrl+.

    However, does anyone know how to make it jump to errors before jumping to warnings?

  20. Matt said

    [Ctrl] + [Space].
    It displays code assistence window. It is the most used feature I use in Eclipse.

  21. Nitish said

    Or rather than going through this entire thread… use…
    Ctrl + Shift + L & see all the shortcuts 🙂

  22. […] shortcut ระหว่างการแก้ไขซอร์สโค้ด บลอก TOP 10 Eclipse Shortcuts ของนาย Suresh Krishna เค้าสรุป 10 shortcut […]

  23. […] Zobowiązałem się dawać trackback do każdego wpisu przetłumaczonego. Oryginalną wersję tego postu znajdziecie tutaj. […]

  24. Luiz Almeida said

    Oh God…we forgot The Most: CTRL + SHIFT + F
    I forgave you.

  25. […] you know Eclipse? Most programmers quickly learn the common keystrokes but never take advantage of all the shortcuts. Here are my favourite lesser-known […]

  26. sasas said

    ssssssssssssssssssssssss

  27. Alex said

    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.

  28. rahil said

    Hit F3 on a method, if the reference used for this method if of an interface then that interface will be opened. Is there anyway by which eclipse show me a list of all the implementing classes for that interface rather than going to interface and then hitting f4?
    wouldn’t it be cool if eclipse went to the class directly if there is only one implementation of that interface :-O)

  29. rahil said

    I find Alt + up/down arrow and Alt Gr + up/down arrow very useful.

  30. Matt Gumbley said

    Rahil, Ctrl-T is the keystroke you seek – shows types implementing or defining methods. Press it again to show supertype/subtype hierarchy.

  31. […] Zobowiązałem się dawać trackback do każdego wpisu przetłumaczonego. Oryginalną wersję tego postu znajdziecie tutaj. […]

  32. karthik said

    Just press Ctrl+Shift+L after you opened the eclipse you will find all the short cut key’s……:)

  33. Chaitanya said

    this is a very helpful Post .
    thank yo so much
    But ,
    can u please tell me , one short cut ,

    if i want to compile a single .cpp or .c file in Eclipse ,
    is thr any shortcut available for it ?
    or else then short cut also if any method available in eclipse..
    please tell me .

    Thanx to All in Advance.

  34. […] you know Eclipse? Most programmers quickly learn the common keystrokes but don’t take advantage of other good shortcuts. Here are my favourite lesser-known […]

  35. CTRL+1 is top of the list here

    http://shortcut-finder.appspot.com/shortcuts.jsp?query=eclipse

  36. javaGuru said

    CTRL+SHIFT+F – format code

  37. srinivas said

    is there any short cut to search in file option?
    thanks in advance.

  38. kayangoky said

    comment5, http://drupal.org/search/apachesolr_multisitesearch/LeXxiK%20%D0%9C%D0%BD%D0%B5%20%D0%BD%D0%B0%20%D0%BA%D1%80%D0%B8%D0%B7%D0%B8%D1%81%20%D0%BD%D0%B0%D0%BF%D0%BB%D0%B5%D0%B2%D0%B0%D1%82%D1%8C%2C%20%D0%B2%D1%8B%D0%BB%D0%B5%D0%B7%20%D0%B2%20%D1%82%D0%BE%D0%BF%D0%B5%20%D0%B3%D0%BE%D1%83%20%D0%B1%D1%83%D1%85%D0%B0%D1%82%D1%8C âûëåç â òîïå, comrades

  39. Because I never want to print my code, I bind Ctrl+P to jump straight to Package Explorer. Then use F12 to jump back to code if needed.

  40. Windows 7 said

    Windows 7…

    […]TOP 10 Eclipse Shortcuts « Sciology = Science + Technology[…]…

  41. Hi there, I read your new stuff daily. Your writing style is witty, keep up the good work!

  42. This seeks to determine if Pure Green Coffee Bean Extract Reviews are widely available in a capsule form.
    Most prescription Pure Green Coffee Bean Extract Reviews
    are not FDA approved as they are promoted as number one Pure Green
    Coffee Bean Extract Reviews despite their lack of approval from FDA.
    Manufacturers and scientists wanted to find out how to use green tea without any artificial additives.

  43. Mes parents m’ont appellée Royale et j’aime beaucoup ce prénom.

    Je suis jeune de 37 berges !
    J’ai repris mes études pour etre nounou … Mes amies racontent régulièrement que je suis solitaire.

  44. hello, Mes parents m’ont appellée Alita et j’aime beaucoup ce prénom.

    Je suis jeune de 40 berges tant pis si on ne le dit pas .

    Ce que je fais : professeur dans le privé … Je suis plutôt d’un naturel enjoué.

  45. With online purchase you can make the best
    deals happen with the help of various online retail stores.
    These handy and space saving dumbbells are positively received
    by fitness enthusiasts not only because of its amazing features but the great result as
    well they get from using it. Inhale as you lift
    the weights and exhale when you release each weight.

  46. I like looking through a post that will make people think.

    Also, thanks for allowing me to comment!

  47. Karine said

    Hi, this weekend is nice for me, because this moment i am reading this wonderful educational post here at my home.

  48. Jeannie said

    Hey this is somewhat of off topic but I was wondering if blogs use
    WYSIWYG editors or if you have to manually code with
    HTML. I’m starting a blog soon but have no coding experience
    so I wanted to get advice from someone with experience.
    Any help would be enormously appreciated!

  49. 1 said

    Hi there, always i used to check webpage posts here early in the
    morning, for the reason that i enjoy to gain knowledge of more and more.

  50. Eugenia said

    I am regular reader, how are you everybody? This paragraph posted at this web site is truly nice.

  51. blogging said

    This is my first time visit at here and i am in fact happy to read everthing at one place.

  52. It’s fantastic that you are getting ideas from this paragraph as well as from our dialogue made at this place.

  53. Mohit said

    Ctrl+N	            Create new project using the Wizard
    Ctrl+Alt+n	        Create new project, file, class, etc.
    Alt+f, then .	    Open project, file, etc.
    Ctrl+Shift+r	    Open Ressource (file, folder or project)
    Alt+Enter	        Show and access file properties
    Ctrl+s	            Save current file
    Ctrl+Shift+s	    Save all files
    Ctrl+w	            Close current file
    Ctrl+Shift+w	    Close all files
    F5	                 Refresh content of selected element with local file system
    
    Shift+Arrow Right/Arrow Left	       Expand selection by one character to the left / to the right
    Ctrl+Shift+Arrow Right/Arrow Left	   Expand selection to next / previous word
    Shift+Arrow Down/Arrow Up	           Expand selection by one line down / one line up
    Shift+End/Home	                       Expand selection to end / to beginning of line
    Ctrl+a	Select all
    Alt+Shift+Arrow Up	                   Expand selection to current element (e.g. current one-line expression or content within brackets)
    Alt+Shift+Arrow Left/Arrow Right	   Expand selection to next / previous element
    Alt+Shift+Arrow Down	               Reduce previously expanded selection by one step
    

    l

  54. Link exchange is nothing else except it is just placing the other person’s
    website link on your page at appropriate place and other person will also do same in support of you.

  55. learn said

    This is very interesting, You are a very skilled blogger.
    I’ve joined your rss feed and look forward to seeking more of
    your excellent post. Also, I’ve shared your website in my social networks!

  56. Jeff Halevy

    TOP 10 Eclipse Shortcuts « Sciology = Science + Technology

  57. freedom mentor

    TOP 10 Eclipse Shortcuts « Sciology = Science + Technology

  58. Imperial Advance

    TOP 10 Eclipse Shortcuts « Sciology = Science + Technology

  59. Foundation for Defense of Democracies

    TOP 10 Eclipse Shortcuts « Sciology = Science + Technology

  60. iPad Repair South Austin

    TOP 10 Eclipse Shortcuts « Sciology = Science + Technology

  61. Mentoring should occur in two arenas: academic & real life.
    32 probability value (or 32% probabilty) falls short of qualifying,
    and hence the picnic will have to be cancelled.

    If you need help with your resume and want excellent example resumes to guide you he recommends the e-book “101 Before-and-After Resume Examples.

  62. There is much more to choose from, and restaurants are not limited to the backgrounds mentioned above.
    Why search engines consider backlinks to rank a website.
    Each year the trend shows Google always climbing,
    now it’s used for about 74% of all searches, and in the distance
    is Yahoo at 14%, and MSN at 9%.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: