5

I've recently switched from Linux, so I'm still getting a hang of things -- please bare with me. ;)

One thing that is really killing my emacs memory muscles right now is the lack of alt+f and alt+b to jump forward and backward by word. I've gotten the meta/option flag flipped in Terminal.app preferences (so alt+. now works as expected), but I haven't found a similar option for Textmate. Even better if I could enable it as a Mac OS X global setting for the U.S. keyboard (so it would work in all input boxes). At the moment I get the following useless (for me) encodings:

alt+f: ƒ

alt+b: ∫

Any help would be greatly appreciated. Thanks!

  • 1
    Thanks Am1rr3zA for pointing out how to style keyboard shortcuts; that looks much better. :) – pithyless Dec 10 '10 at 6:55
5

As usual... KeyRemap4MacBook to the rescue :P Its emacs mode will give you those bindings, and you can choose a lot more bindings than that as well:

alt text

1

FYI, it doesn't seem to be mentioned in the Mac shortcuts list, but on my Macbook Air you can press

Ctrl+option+f

and

Ctrl+option+b

to move forward and backward one word, respectively.

0

One way to remap the keys in other applications as well would be to create ~/Library/KeyBindings/ and save a property list like this as DefaultKeyBinding.dict:

{
    "~b" = moveWordBackward:;
    "~f" = moveWordForward:;
    "~d" = deleteWordForward:;
    "~l" = (moveWordForwardAndModifySelection:, lowercaseWord:);
    "~u" = (moveWordForwardAndModifySelection:, uppercaseWord:);
    "~c" = (moveWordForwardAndModifySelection:, capitalizeWord:);
}

You could also cp /Applications/TextMate.app/Contents/Resources/KeyBindings.dict ~/Libary/Application\ Support/TextMate/KeyBindings.dict and add the same keys there.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.