It requires a bit of setup, but it is well worth it.
Eclipse shortcut keys for mac code#
You can make a beautiful looking code out of a mess with this. It is possible, just keep reading.įormats code. Much faster way would be if you could just hit the shortcut and invoke the particular wizard. This is not very quick because you have to select the wizard type (weather you want to create new class, jsp, xml or something else) in the next step. If you want to change its behavior read the previous post. It will either launch the last launched class (my preffered way) or it will launch currently selected resource (the default way). What gets launched depends on your settings. When in editor, press Ctrl+F7 to switch to the Package Explorer, or hold Ctrl and press F7 multiple times to switch to other views. Comes handy in a situation when you want to periodically switch between two editors, something, what is nearly impossible with Ctrl+E as it sorts entries quite randomly. This is an slower alternative to Ctrl + E.
But, where is the Foo class? Is it in the Boo project and in the foo.bar package? Or somewhere else? With this shortcut, you don't need to know. Imagine, that you need to have a look at the Foo class. The best thing you can do if you see an error is to use the quick fix. Or you could use the "Add unimplemented methods" fix here. You could use the "Split variable declaration" on the bar variable, and then move it with Alt+Arrows above the try block. You can find even more usages: Convert local variable to field, rename in file, Inline local variable. I activate the quick fix, split declaration, and use alt + arrow to put it where it belongs.
Sometimes I need to broaden the scope of a variable. My favorite is the "Split variable declaration".
Quick fix comes handy in other situations too. You can use the quick fix at every error you ever receive. Now, select the "Add unimplemented methods" option. While you are on line where the error occurs, press this combination to activate the quick fix. You will get an error, because the inherited methods are not yet implemented. Imagine you create a class, which implements some interface. But when you press this magical combination, all your missing classes will be imported, and the unused imports will vanish. What happens when you first use a class you have not yet imported? You will see an error. Now, if you need to look at the Foo class, just press Alt+Left Arrow. Imagine you just created a class Foo, and now you are working on a class Boo. Notice, that it will be always correctly indented. You can even select more rows and move them all. Move the row (or the entire selection) up or down. Try it! You no more need to grab the mouse and select the line, no more Home, Shift + End, Delete. These shortcuts are set up by default, they should all work.ĭelete row. Below you will find a set of essential keyboard shortcuts that I love. It is said, that if a function does not have a key binding, it is useless. What do you think is faster: pressing ALT + C or right clicking the project, selecting Team -> Commit? I am trying to keep the mouse laying still and control the IDE completely using keyboard. The less you touch the mouse, the more code you can write. You should try to keep your hands on keyboard.