Sunday, July 7, 2013

Short Keys for Eclipse

Hello Friends,

I hope you are doing well.Most of you must be working on Eclipse.Today I am gonna tell you some important short keys in Eclipse.These keys were always available in eclipse.I am just gonna tell you why and when should you use them.There are so many actions which you take while writing your java code but if you use these short keys you will finish your work faster and without frustation.Ok so,let me make your life easier..


  1. This is the first step and very useful step.You open your eclipse and you want to work on a particular file.You will open your package explorer search for that file and then open it.You could directly press CTRL+SHIFT+R if you know the file name.It will ask you file name just give some letters of your file name it will search that file for you.
  2. Suppose you have many files opened in your editor.You are working on a file suddenly you want to go to some other opened file.You can switch to that file in faster way by just pressing CTRL+E.
  3.  if you want to move any line up and down in your code.You copy line and past it at some location.But you could do it just by putting your cursor over the line and  pressing ALT+UP and ALT+DOWN.Your line will move up and down to your desired position.
  4.  Suppose you have a java file containing many methods and you want to go to a particular method.What you might do is you will be looking it in entire file when you could just find it by pressing CTRL+O. It gives you the list of all methods in current file.You can click on any method and you will reach to that method.
  5.  If you want to delete any line or current line just press CTRL+D .
  6.  If you want to duplicate any line or current line just press CTRL+ALT+UP or CTRL+ALT+DOWN.
  7. While writing java code it's very common to comment or uncomment  a line or piece of code.Just select that piece of code or put your cursor over the line you want to comment and press SHIFT+/  and press same for uncomment.
  8. Suppose you run you code and you get some error that tells you that your are getting error at 103 line no.You can go to that line just by pressing CTRL+L.
  9. You can go through all the methods in any java class by pressing CTRL+SHIFT+UP and CTRL+SHIFT+DOWN.By doing so you can go to the immediate previous and next method. 
  10. Suppose you are working on any method in a very large java file and you go to any other method just to check something and now you want to come back to the method you were working on.You will go through all the methods and fine your's or you could just press CTRL+Q and it will take you to to the last edited place in your file which is apparently your method in this case.



These are most useful short keys in eclipse.I think every developer should know about these basic keys.There are so many others you can explore by your self.You can find out list of all short cuts by pressing CTRL+SHIFT+L.