Skip to content

Instantly share code, notes, and snippets.

@hamsolodev
Created January 1, 2013 10:54
Show Gist options
  • Save hamsolodev/4426544 to your computer and use it in GitHub Desktop.
Save hamsolodev/4426544 to your computer and use it in GitHub Desktop.
(defadvice deft-new-file (after deft-markdown-title
activate compile)
"After Deft creates a new file, make the supplied text a Markdown header"
(if (string-equal deft-text-mode "markdown-mode")
(progn
(goto-char (point-min))
(insert "# ")
(goto-char (point-max)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment