Skip to content

Instantly share code, notes, and snippets.

@mattsears
Created January 29, 2013 15:17
Show Gist options
  • Select an option

  • Save mattsears/4665009 to your computer and use it in GitHub Desktop.

Select an option

Save mattsears/4665009 to your computer and use it in GitHub Desktop.

Revisions

  1. mattsears created this gist Jan 29, 2013.
    11 changes: 11 additions & 0 deletions defuns.el
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    ;; 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)