Mac OS X is special. Mac OS X has it’s own nice looking user interface. But it also differs from other operating systems in the way you move the cursor with the keyboard. All those Cocoa (and most Carbon) applications respect the key bindings of Mac OS X. The key bindings are even documented in the Apple Human Interface Guidelines.
So you are in luck when you have to work with XCode, TextEdit, … but when you have to write Java code there comes….. oh yes …. Eclipse.
Eclipse is this bombastic Java IDE which looks like a Windows app on each platform it supports. The Mac seems not to be the primary platform for Eclipse.
And Eclipse does NOT respect the default key bindings of Mac OS X (a bug is already submitted). Someday when I over and over again used the Eclipse shortcuts in XCode and the Mac OS shortcuts in Eclipse I started to change the key-bindings in Eclipse to be a little bit more “Mac”.
It’s a progress in work and at the moment I changed only the bindings to move the cursor and for searching.
- Select text to line start/end: Command-Shift-Left and Command-Shift-Right
- End of text: Command-Down
- Start of text: Command-Up
- Line start/end: Command-Left and Command-Right
- Page Down/Page Up: Option-Down and Option-Up
- Page Down/Page Up: Option-Page-Down and Option-Page-Up
- Previous/next word: Option-Left and Option-Right
- Find Next: Command-G
- Find Previous: Command-Shift-G
- Download the File org.eclipse.ui.workbench.prefs.zip and unzip it.
- Copy the unzipped file org.eclipse.ui.workbench.prefs to your Workspace subdirectory “.metadata/.plugins/org.eclipse.core.runtime/.settings/”. The “.metadata” directory is by default hidden in Finder. Use the terminal to copy the file to the desired location.
Note: Eclipse shall be stopped before replacing the file. You may have done already some changes to the eclipse workbench configuration which may be lost when you replace the prefs file. It work’s for me but I am not responsible for any damage that results from using this prefs file. I’ve used this file with Eclipse 3.1.1.
If you add/change more key bindings please give me a favor and send the prefs file back to me at “martin” on this domain. I’ll link to the latest and greatest prefs file here.
Update: As Douglas mentioned in his comment below there is an easier way to share the key bindings. To use the preferences-import feature of eclipse use this preference-export-file. You have to unzip the file before importing. Thanks a lot for this tip!