Skip to content
Minor mode to preview markdown output as you save
Emacs Lisp HTML
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Client javascript support: fixes #18 Dec 5, 2016
LICENSE Initial commit Sep 13, 2014 fix #32 drop dep on uuidgen; replace with uuid function Dec 13, 2018
favicon.ico favicon.ico Dec 7, 2016
markdown-preview-mode.el fix #32 drop dep on uuidgen; replace with uuid function Dec 13, 2018
preview.html Add inline css/js support Nov 22, 2017

Markdown preview mode


Markdown preview in emacs features:

  • on save/idle preview update
  • scroll sync
  • custom/extra css and javascript
  • remote preview
  • multiple simultaneous previews


  • package-install markdown-preview-mode
  • el-get-install markdown-preview-mode

Markdown processor

markdown-preview-mode depends on markdown-mode for markdown processor, defined by markdown-command and it is markdown by default. Please, make sure it is in your $PATH.


  • markdown-preview-mode - start mode and open preview window.
  • markdown-preview-open-browser - open preview window for current buffer.
  • markdown-preview-cleanup - cleanup running processes (close websocket and http servers).


  • customize-option markdown-command - change markdown processor; take a look at multimarkdown
  • customize-option browse-url-browser-function - change the browser.
  • customize-option markdown-preview-host - change http/websocket server address.
  • customize-option markdown-preview-ws-port - change websocket server port.
  • customize-option markdown-preview-http-port - change http server port.
  • customize-option markdown-preview-auto-open - change the way preview window is open.

Remote access

  • Customize markdown-preview-host to
  • Customize markdown-preview-http-host to
  • Set markdown-preview-auto-open to nil to disable window opening at remote emacs server.
  • Start markdown-preview-mode. Http link for preview will be printed to *Messages* buffer. If not - run markdown-preview-open-browser to get the link printed.
  • Setup 2 tunnels for and and then open preview link in local browser. Adjust tunnels according to your custom ws-port and http-port settings.

Extra css

Add extra css to default solarized dark theme

(add-to-list 'markdown-preview-stylesheets "")

Override theme completely

(setq markdown-preview-stylesheets (list ""))

Extra javascript

Add MathJax

(add-to-list 'markdown-preview-javascript "")


(add-to-list 'markdown-preview-javascript '("" . async))


You can’t perform that action at this time.