"Edit in TextMate" (Keyboard Maestro Macro)
I don’t think I ever published my Edit in TextMate Keyboard Maestro macro. Oh well. Anyway. I’ve just spent 2 or 3 minutes improving my shoddy old macro bringing in some variable goodness and some of the experience I’ve gained from making my Markdown Library.1
So what does it do. Well, basically it checks now whether you have text selected or not2. The macro then does either a ⌘A followed by ⌘C, or a ⌘C only when there was a text selection already.
The macro(s) also remember the frontmost app and when you Paste Back this app is reactivated.
You may want to add these to your Global Macro Group. Shortcut is ⇧⌃E. Type ⇧⌃E → E, and ⇧⌃E → P.
A very first alpha is available. You manually have to switch to the v2 branch to check out the new stuff. Currently there’s not much new stuff. I’m using a plugin now for wrapping text, which you can use in your own macros to wrap text with arbitrary characters. ↩
This whole text selection stuff is really hard to figure out. Gabe and I got into an argument about good approaches. I would love to support other languages where the ⌘C or ⌘X isn’t the shortcut to copy/cut to check whether something was selected, but until now I haven’t been able to. Until now means, I think a KM 6 plugin could do this. I have to spend some time in Xcode though. ↩