Julius Eckert
Julius Eckert

Reputation: 1511

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)

Upvotes: 11

Views: 2706

Answers (2)

Debajit
Debajit

Reputation: 47111

A much better way to do this (and this applies to all Mac apps in general) is to

  • Open System Preferences > Keyboard & Mouse > Keyboard shortcuts
  • Click the + sign at the bottom
  • Choose TextMate from the application menu
  • Type the exact name of the menu command for next completion and previous completion
  • Now type the shortcut you want to use and click the Add button

Upvotes: 14

andi
andi

Reputation: 14458

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 (->|).

Upvotes: 13

Related Questions