Markdown Macros in MarsEdit
I have decided to move over to tumblr for my blogging needs (more on this later). tumblr supports writing posts in Markdown, which I have come to appreciate as a nice way of writing text. For writing posts, I use MarsEdit, which even has a built in Markdown filter to give me a preview of how things will look.
Mowever, the default markup macros output HTML. Seemed a little pointless, so I decided to change the macros to output Markdown, making my writing much nicer… here is what I came up with:
-
add link opening:
[
-
add link closing:
](#askurl Add Link:#)
-
paste link opening:
[
-
paste link closing:
](#pasteurl#)
-
bold opening and closing:
**
-
italics opening and closing:
*
-
preformatted:
\t (aka a tab)
-
line break:
\s\s\n (aka two spaces and a newline)
-
paragraph opening:
\n #selected text# (aka a new line then the text)
-
paragraph closing:
\n\n
(aka two new lines)
-
blockquote:
> #selection#
-
code opening:
` #selected text#
-
code closing:
`
-
h1 opening:
# #selected text#
-
h1 closing:
#
(for the other headers, just add more #
to the opening and closing)
Pretty basic.. I’ve considered the possibility of writing Applescripts to convert selections to lists, etc. I might use this as a guide.