[TxMt] Input Patterns [and keybindngs]?

Allan Odgaard allan at macromates.com
Wed Apr 6 08:44:55 UTC 2005


On Apr 6, 2005, at 0:22, Steve Lianoglou wrote:

[ space to expand snippets ]
> Yeah ... I know it be might tricky at times to trigger things on a 
> space, but some things you just don't type that often .. like 'fr ', 
> or 'swt ' (for a switch statement) .. or 'fnc ' .. for a 
> function-snippet trigger (well, at least not in English anyway ... 
> sometimes it does catch me but I've been able to work around it with a 
> little dance about the arrow keys and some carefully placed spaces 
> here and there -- really infrequent, tho)

Also, the scope might be able to help here, since you can limit the 
scope of where the item will fire.

> But your suggestion is interesting ... are you saying I should bind 
> the ctrl-space 'chord' to the tab key so I can use the 
> already-in-there TextMate Tab-expansion triggers?

Not being the OP, but I think that was the idea.

> That might be a good workaround for me for the time being ... I 
> remember coming accross something about a KeyBinding file that I can 
> mess around w/ ... I think someone said it was in 
> ~/Library/KeyBindings ... though I don't have one there ... I could 
> make one, but I wouldn't know what to put in there ... hmm .. maybe 
> google can help on that one.

Or maybe Help / Key Bindings! :)

> But if anyone would like to cater to the lazy man and has any insight, 
> it would be much appreciated.

If you're lazy just do:
  cmd-option-M  (start macro recording)
  tab           (inserts a tab/expands snippet)
  cmd-option-M  (stop macro recording)
  cmd-ctrl-M    (save scratch macro)

Now set the key equivalent of that macro to option-space or whatever 
you like.




More information about the textmate mailing list