I use the amazing Brett Terpstra’s Marked.app to preview most of my Markdown-formatted text. Marked makes writing for the web using any text editor and a cinch. A simple Cmd-Shift-C copies the previewed content in HTML ready to publish online. You can also save straight to an HTML file or a PDF if you’re into the whole printing thing.
One day I started looking for a way to ship the formatted text out to the body of an email message. Not seeing a built-in shortcut, I joined the trendy kids and created one in Keyboard Maestro.
The shortcut is only available when Marked is the frontmost application and is tied to the same shortcut Apple’s Mail.app and Sparrow to deliver a message–Cmd-Shift-D. This KM macro, customized for Sparrow on my computer, performs the following operations:
- Select all of the rich text in frontmost Marked window
- Bring Sparrow to the front
- Open a blank message
- Tab through the fields to get to the message body
- Give me a couple of returns in case I want to prepend something without any formatting oddities
- Reverse-tab back through the fields so I can address the message normally
Mousing around and hitting all of the shortcuts takes a moment for my tired old brain to process. Keyboard Maestro runs through these steps in less than a second.