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@incomumdesign.com http://www.incomumdesign.com
On 09/08/2005, at 10.16, Benjamin Jackson wrote:
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
Yes, and you can also copy it to ~/Library/Application Support/ TextMate so you won't have to make the change with each new release.
However, it's not possible to make a key binding that inserts a specific character.
I guess TM should fall back to the normal action of a key (that is, insert it), when the action method configured for that key isn't implemented -- I may have this changed for 1.1b17.