[TxMt] Paste as

Rasmus Malver rasmus at malver.dk
Sun May 10 13:13:09 UTC 2015


Hi everybody!

I'm trying to make an enhanced paste-function which evaluates the text 
pasted into a blank textmate document, and assigns the document's 
language accordingly.

Is there a non-AppleScript way of assigning language? It is very lacking 
in text examination, so it would be much less clumsy in, say, bash.

I know I can use this.:
keystroke "h" using {control down, option down, shift down}
keystroke "1"

To set the syntax as HTML by “faking” the keyboard shortcut.



Thanks!
Rasmus


More information about the textmate mailing list