[TxMt] Key bindings question

Benjamin Jackson ben at incomumdesign.com
Tue Aug 9 08:16:23 UTC 2005

Just hacked TextExtras to do auto-completion on space... however to get 
it to work I had to alter DefaultKeyBindings.dict, which is now messing 
with TM as I assume it's using a different InputManager and can't find 
the functions I assigned to the space key. It would be nice to be able 
to use the completion functionality within TM, but if it's not 
technically possible then I'll settle for just resetting the bindings 
for it.

How can I override these bindings just for TextMate? I'd assume it 
would be possible by editing the KeyBindings.dict file in TM's 
Resources, however I have no idea how (or if it's even possible) to map 
a key binding to an NSTextView method with arguments. My first try 
would be

     " " = "insertText:@' '";  /* space */

However I read somewhere about @-initialized strings being defined at 
compile-time, so this doesn't work.

Any ideas? I'll make sure to put together a nice write-up when I'm done 
Ben Jackson
Diretor de Desenvolvimento

ben at incomumdesign.com

More information about the textmate mailing list