Recently I've been looking into MacOSX's customizability of key
bindings. As it turns out, MacOSX's key bindings are remarkably
customizable, and for us emacs geeks a number of functions are
available to make us feel at home. I've managed to recreate a
remarkably emacs-like editing environment with my DefaultKeyBinding.dict
,
complete with ^X key combos, etc. If you're not familiar with
how to use this file please check out Apple's page on
Text System Defaults and Key Bindings, basically you
just need to save it in ~/Library/KeyBindings/
.
You may want to go straight to the resource links below if you're not familiar with how Mac OSX's key binding mechanism works.
Unfortunately, not all of the bindings in the
DefaultKeyBinding.dict
are honoured in the Project
Builder, possibly because methods are named differently, etc,
I'm not quite certain. You can provide it with it's own key
bindings in PBXKeyBinding.dict
or
PBKeyBinding.dict for the
latest Project Builder
(v1.1.1). I'm not quite satisfied with my current binding
configuration so I won't include it here, yet.
One really cool feature I've found is the 'complete' method
provided by the NSResolver class. It appears to be overriden in
usefull ways by different applications/classes such as the
'Open' dialog for files which allows you to do filename
completion through this method, or the Project Builder which
will complete function names, variable names, etc! Bind it to a
dedicated key you find handy and enjoy. I recommend
M-/
(AKA Option-/
) as emacs appears to
have some form of completion attached to that. Take a look at
my DefaultKeyBinding.dict
file for an example of how to bind this.
There are several resources which document how to customize your key bindings, here's a list of the ones I've found usefull or worth mentioning, at least: