At the suggestion of the good Dr.Drang, I've modified the Keyboard Maestro macro to create better headings.
The new version inserts spaces around the text before wrapping in hash tags. This looks nicer and it's how I type Markdown headers.
### A Generic Heading ### I also inserted a search and replace action. This extra step allows me to select an existing Markdown header and change it to another level heading with the same macro.
Here's a quick macro that demonstrates a couple of convenient features of Keyboard Maestro.
The macro works on selected text. It pops open a user input window and asks for the Markdown heading level to use. In this case I want an H3 header.
The result is to convert the selection to an H3 Markdown element. With one macro hot key I can convert a selection to any heading level. The process looks something like this:
I posted a tip for creating a Markdown cheat sheet a week ago. That solution used Marked to display the Markdown as formatted text. But I wasn't happy with needing to open and then close a Marked window. So I got to noodling around and remembered how useful Automator is.
I've created a very simple Automator workflow that uses the URL viewer. Rather than loading a remote HTML file, it loads a local file that I created with Marked.
Dr.Drang has a post today about his attempts to integrate Keyboard Maestro. I don't agree with the premise, but rather than rehash a conversation here, I invite you to visit the comments on his post.
I have a small arsenal of text processing macros in my Keyboard Maestro bunker. I’ve described some of my macros in the past. There are several that do one specific task but I also try to build more generic macros that ask for input too. All of the following macros work on a text selection, rather than performing a snippet expansion. I use TextExpander for snippet expansion. However, Some have sibling macros that works just on the clipboard (like text cleaning).
A clever macro for time tracking by Rafael Bugajewski at Juicy Cocktail.
Keyboard Maestro has some granular control over window arrangement. Combine that with the ability to trigger specific menu items, I can create a preset view for just about any folder.
For example, this macro opens my Notes folder and displays it sorted by last modification date. I use a minor "If Condition" trick to turn off the toolbar if it is visible. The "If Condition" looks to see if there is a menu item named "
Keyboard Maestro 5 contains several new conditional actions. The "Pause Until Conditions Met" actions is modest sounding but contains a lot of power. Fundamentally, the action will pause the currently running macro and watch for a specific condition to be met. What condition? Well, pretty much anything.
I'm sure there are some very interesting ways to use this, but here's a somewhat boring yet powerful macro for entering a footnote in Markdown on BBEdit.
Here’s a quick trick. There’s a KM action to toggle a macro group on and off. For me, this is handy while using macros to override some BBEdit functions. If I ever want to get back to the native functionality in BBEdit, I just toggle my BBEdit macro group.
The same macro reenables the BBEdit macro group.
Since migrating to Lion, I’ve noticed several of my Mail rules fail to run. I have a number of rules that tag and move incoming messages. Rather than waste time trying to figure out why the rules do not run properly, I just setup a scheduled Keyboard Maestro macro that runs the rules for me. So far, this seems to solve the problem.
Edit: Take out the “Activate Mail” step unless you want to drive yourself crazy.