Skip to content

Instantly share code, notes, and snippets.

@jorgenschaefer
Created October 21, 2012 11:46
Show Gist options
  • Save jorgenschaefer/3926788 to your computer and use it in GitHub Desktop.
Save jorgenschaefer/3926788 to your computer and use it in GitHub Desktop.
;;;;;;;;;;;;;;;;;
;;; markdown-mode
(when (require 'markdown-mode nil t)
(setq markdown-command "markdown_py"
markdown-italic-underscore t
markdown-indent-on-enter nil
markdown-follow-wiki-link-on-enter nil
)
(add-to-list 'auto-mode-alist '("\\.md" . markdown-mode))
(define-key markdown-mode-map (kbd "TAB") 'markdown-cycle)
(define-key markdown-mode-map (kbd "<backtab>") 'markdown-shifttab)
(define-key markdown-mode-map (kbd "C-M-f") 'forward-sexp)
(define-key markdown-mode-map (kbd "C-M-b") 'backward-sexp)
(defun markdown-check-change-for-wiki-link (&rest ignored)
"Do nothing.
The default markdown implementation exhibits a bug. You can
reproduce it using the following:
M-: (when (looking-at \"\") (replace-match \"abc\"))
This will insert \"abc\" at the current point, but move point
down one line. Removing `markdown-check-change-for-wiki-link'
from `after-change-functions' fixes that."
nil)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment