Skip to content

Instantly share code, notes, and snippets.

@mattsears
Created January 29, 2013 15:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattsears/4665009 to your computer and use it in GitHub Desktop.
Save mattsears/4665009 to your computer and use it in GitHub Desktop.
;; This function will open Marked.app and monitor the current markdown document
;; for anything changes. In other words, it will live reload and convert the
;; markdown documment
(defun markdown-preview-file ()
"run Marked on the current file and revert the buffer"
(interactive)
(shell-command
(format "open -a /Applications/Marked.app %s"
(shell-quote-argument (buffer-file-name))))
)
(global-set-key "\C-cm" 'markdown-preview-file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment