Key combination | Effect | |
Ctrl+Shift+C | Comment/Uncomment selection | |
Ctrl+Shift+/ | Comment selection | |
Ctrl+D | Delete line | |
Ctrl+Del | Delete next word | |
Ctrl+Bksp | Delete previous word | |
Ctrl+Shift+Del | Delete till EOL | |
Alt+Shift+M | Extract method | |
Ctrl+F | Find and replace | |
Ctrl+K | Find next | |
Ctrl+Shift+K | Find previous | |
Ctrl+L | Go to line | |
Ctrl+Shift+D | Go to matching bracket | |
Ctrl+Shift+enter | Insert line above | |
Ctrl+Enter | Insert line below | |
Ctrl+Shift+F | Auto format selected code |
Enjoy :)
3 comments:
You might find annoying the fact, that some key combinations in Eclipse are not the ones you got used to, so
what you should do is - you'd go to Eclipse->Pref->General->Keys
and adjust all the key combinations the way you like, BUT each time you create NEW workspace
eclipse will loose all the key-settings and you will have to re-assign (and resolve possible conflicts and stuff) all
you key combination all over again! What a pain in the ass!!!
I chase down where Eclipse store your settings.. it is plain XML file, which you can copy from one workspace into another
to make magic happen and all your keys are in place! Everybody is happy!
1) [Adjust & Store]
As soon as you finish adjusting key in a way you like (doesn't matter for C++ view or for Ruby plugin), just find and store
somewhere this file:
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs
note: if you didn't change prefs, this file doesn't exist on a fresh workspace.
2) [Transfer by coping]
In order to transfer your key settings to new eclipse-workspace just copy your stored file into this location of new workspace:
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs
3) [Restart]
then don't forget to restart your Eclipse platform either by closing it and opening it again, or just by switching
to another workspace and then switching back
4) [Enjoy]
Don't forget to enjoy your life! ;)
Dmitry Shevkoplyas
hmm.. message got cut for some reason.. blog doesnt allow long lines here, so the full path to the magic file, once again, is:
.metadata/
.plugins/
org.eclipse.core.runtime/
.settings/
org.eclipse.ui.workbench.prefs
Thank you Dmitry!
It's quite a useful comment.
Post a Comment