Who does not like shortcuts? Especially when it comes to the keyboard. Some would say that the mouse is only for the amateurs! Hotkey combinations are keyboard shortcuts that make sure your fingers remain on the keyboard, which means that you can work in a smooth flow.
Good java development team have always emphasised on hotkey combinations and that is why a good program will always come with these. Eclipse is no exception. But knowing all combinations is not a joke and only comes with practise. Here are our picks for the must-know Eclipse hotkey combinations:
- Ctrl + N: Opens new wizard. You will then have to select the type.
- Ctrl + M: Maximise or minimise the tab.
- Ctrl + I: Corrects indentation.
- ALT + Up/ Down arrows: Move up and down the rows with ALT + up/down arrows. You can also move entire rows.
- Cntrl + D: Nothing saves time like deleting lines of code! Just select the line and hit Cntrl + D.
- ALT + Left/Right Arrow: Go back and forth with ALT + Left/Right Arrow. The Left arrow takes you to the last place you edited and the Right key will bring you back.
- Ctrl +1: This is the shortcut to the quick fix. It can help you fix any errors or misses in the code.
- Ctrl + Shift + R: It helps you find any file, including XML and configs. But it is limited to your workspace and won’t search the JAR.
- Ctrl + Shift + T: This one will find your class/file even in the JAR. So, if you need to find something in a jiffy, this is the shortcut to hit.
- Ctrl + Shift +O: This shortcut is useful in organising imports. This helps you import missing classes, while getting rid of unused classes.
- Ctrl + E: Lists all open editors
- Ctrl+ Shift + F: This is almost like a magic wand that can clear the mess in your code. The shortcut formats code.
- Ctrl + J: The search function that gives you results as you type.
- Ctrl + F4 or Ctrl + w: Closes current file
- Ctrl+ Shift+ W: Closes all files.
- Ctrl + F: A handy tool that will help you find/replace
- Ctrl + F6: Similar to Cntrl E, but slower. It allows you to switch between open editors. Unlike Cntrl E, however, it gives you better control.
- Ctrl +F7: Used to switch views. It can take you from editor to Package Explorer. If you press the F7 key multiple times, you can toggle different views.
- Ctrl + F8: Like F7, it helps you move between perspectives.
- Ctrl + F11: It will launch applications according to the settings, either a launched class or a selected resource.
And finally,
- Ctrl+ Shift + L: Gives you the list of current hotkey combinations!
We know that this is quite a long list. But once you get the hang of it, the shortcuts can make your life really easy. There are those who think that it increases productivity (since you are no longer switching between the mouse and the keyboard), we just like it because it seems hassle free. So, here’s our last tip: keep a printout taped close by.