Search code examples
textmate

Textmate: remap Escape for word completion


In the Textmate code-editor I use the Escape-key, for word completion, alot. Is there a way to bind another key-shortcut to its functionality ?

(ps: my CAPSLOCK is already CTRL)


Solution

  • To remap the esc key you have to copy

    /Applications/TextMate.app/Contents/Resources/KeyBindings.dict
    

    to

    ~/Library/Application Support/TextMate/KeyBindings.dict
    

    and then edit it, preferably using TextMate :) as Property List Editor messes up the codes.
    Look for nextCompletion and previousCompletion and replace their values with whatever suits your needs best.
    For example, you could replace \033 (code for esc) to \t (->|).