Using Keyboard Maestro to drive Marked 2

My writing tools are varied based on where/how I'm writing - laptop vs iPad vs iPhone. But the final review process almost always ends up on my Mac in Marked 2. Marked 2 is a peculiarly wonderful app in that it doesn't directly create anything. Marked 2 is just for viewing Markdown text files.2 So when I view my content in Marked 2, I can see the content using the same CSS styling as I use on my site.

Normally when I run Marked 2, I will open a folder from Dropbox that holds all of my Markdown (MD) notes. Marked 2 has the ability to open a folder and then change what document it being previewed based on what file has had the most recent revision. This makes my writing time so much more effective because I can make changes to one post, updates notes in another file, come back to a 3rd document - and I don't have to change anything in Marked 2.

Brett Terpstra (@ttscoff), the creator of Marked 2 wrote in a recent blog post about using URL handlers in Marked 2. I looked a while back on using the URL handlers1 and the format is pretty simply. Basically you can open a MD file in Marked 2 from either a link or from Terminal command. For example:

open -g 'x-marked://open?file=filename.md&raise=true'

The problem I had with the URL handlers in the past was the it required an actual filename. I don't always know the full file name when I open Marked 2 because I want it to open my MD folder, not a specific file. What I wanted out of the URL handler was something equivalent to this:

open -g 'x-marked://open?file=~/Dropbox/MDFolder&raise=true'

Since Marked 2 didn't have the option to open a folder, I looked at creating a macro in Keyboard Maestro. The goal was to create a keyboard short cut to open Marked 2 and have it open my normal MD file folder.

With this macro, Marked 2 is opened and then will open my MD file folder.


  1. Or x-callback-url for iOS reference.  

  2. Brett got a Marked 2 revision kicked back because the Apple reviewer couldn't create a file. RTFM... ;-) 



Previous posts:

  1. Maximo's Built In Sharing Service

    One of the challenges in my Maximo environment is an efficient way to keep and store 'living documents'. A lot of us have Dropbox, Box, SharePoint, etc., but most of those services are either restricted from widespread access (Dropbox) or have a versioning system (SharePoint) that can make keeping living …

  2. Using Keyboard Maestro for Split View on macOS

    With iOS 11 now out, a lot of my fellow geeks have been going on about the drag and drop features with split view on iPad. 1 iMore recently had a post about using Split View on macOS. While I've known about the split view feature for a while, I've …

  3. What's wrong with the TouchBar MBP

    Back in October, Apple released a new version of the MacBook Pro (MBP).

    Looking at the October released MBP, it's a gorgeous laptop. What's not to love. And timing couldn't have been better, because my MBP logic board on my 2012 model had just died and I was already looking …

  4. View Footer/Header in Word 2016

    This post is more for me to have a public reference point when I have this problem again. 1 Out of the box, Word 2016 for macOS has a problem of not showing the header or footer when you create a new document.

    For the longest time I was trying …

  5. iPad vs Mac (for the power user)

    Sometimes a great idea isn't your own. And lately another engineer has been beating me to the punch on my ideas. Dr. Drang (@DrDrang) has a recent post that covers the next area I was looking at in my iPad experiment - the power of the iPad vs the Mac. In …

Top