Mark Damon Hughes MultiMarkdown [Parental Advisory: Explicit Lyrics] [about]
MultiMarkdown
Sat, 2011Feb05 18:03:56 PST
in Mac by kamikaze

Mention this morning of writing tools like VoodooPad, Scrivener, and Circus Ponies Notebook made me rethink a long-standing pain in my writing process.


I like

  • Writing in BBEdit, or OmmWriter when there's too much noise in my head to concentrate, or Pages on iPad with the formatting bar rolled up.
  • Having formatted output.
  • Definition lists, so Standard Markdown isn't fully useful to me.
  • One keypress to preview my document.

I don't like:

  • Writing in a word processor. I get distracted with all the shiny formatting tools. VoodooPad and Scrivener are nice for organizing formatted text, but I often don't want that.
  • Writing plain HTML. Even after almost 20 years, I can't see the text for the <tag>s.

Solution

MultiMarkdown does almost all of that.

To preview, I wrote this script, made it a BBEdit Unix Filter, and gave it a key Cmd-Ctrl-M in the Unix Filters Palette:

#!/bin/bash
$HOME/Applications/MultiMarkdown/bin/mmd2XHTML.pl "$1"
outfile=`dirname "$1"`/`$HOME/bin/splitext.py "$1"`.html
mv "$outfile" "$TMPDIR/Markdown-Preview.html"
open "$TMPDIR/Markdown-Preview.html"

splitext.py is a little Python utility I wrote to remove the extension from any filename passed in, put it in your ~/bin

#!/usr/bin/env python3.1
import sys, os.path
filename = os.path.basename(sys.argv[1])
print(os.path.splitext(filename)[0])

Also, add a BBEdit Language entry for .md = Markdown, and you get syntax highlighting.

To turn off those stupid goddamn “smart” quotes, open MultiMarkdown/bin/SmartyPants.pl and change the line:

my $smartypants_attr = "2";

To:

my $smartypants_attr = "0";

Obviously, this is only a valid solution for serious Mac/Unix nerds, but I'm liking it so far.

@Verso says: "MultiMarkdown is The Way, The Truth, and The Light. So say we all."

← Previous: The Daily Two Minutes Hate (Mac) Next: Xcode documentation viewer (Mac) →
Feedback  | Key: ] =local file, * =off-site link  | Copyright © 2003-2010 by Mark Damon Hughes | Subscribe with RSS 2.0