Hacker News new | past | comments | ask | show | jobs | submit login

What are some examples of shortcuts you recommend?



Find your own workflow and memorize the shortcut keys.

Some of the keys I memorized:

F3 and F4 are must.

Ctrl + . = Go to (next) Error

Ctrl + 1 = Quick Fix (usually follow the above)

Ctrl + Shift + T = Open (T)ype (Java class/interface)

Ctrl + Shift + R = Open (R)esource (all files)

Ctrl + E = Show list of opened files in the IDE (if you type the file name it'll highlight/select it for you once this pop-up is active)

Format on Save - hook up your style with the Save action (right indentation, spaces, tabs, or whatnot).

Bind others that requires multiple steps (generate getters and setters).

If you're like me and use JUnit as a substitute for REPL:

Alt + Shift + X + T => run unit test.

Alt + Shift + D + T => run unit test in debug mode.

There are tons more if you know how to use Eclipse...

For Mac: swap the Ctrl key with Cmd.


I was doing some Java coding recently for the first time in a long time and I was really shocked at how good the synergy between Java and a good IDE can be. Java as a language is uninspiring but it's only half the story.


Also check out Maven. Java, IDE (eclipse/intelliJ), and maven will give your productivity a turbo boost.


A couple more not used by Notch:

Alt + Shift + i = inline variable/method

Ctrl + Shift + up/down = select the larger/smaller block of Java's AST

I also tend to create shorter keybindings for unit tests:

Ctrl + R = run unit test (from the test class file)

Ctrl + Alt + R = re-run last unit test




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: