Setup Markdown in Emacs

Install markdown processor:

sudo apt-get install markdown

Install markdown mode for Emacs

For a full story read this. However, if you want to make it quick:

  • Create ~/.emacs file and dump the following into it:
(require 'package)
(add-to-list 'package-archives
             '("melpa-stable" . ""))
  • Restart Emasc. When restarting, make sure not to use -Q option, cause that effectively ignores your .emacs file from being processed.
  • Install the package
M-x package-install RET markdown-mode RET

At this point, Markdown is installed.

Install preview util

Markdown preview

M-x package-install RET  markdown-preview-mode RET
  • 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).

That is all. Create a .md file and experiment with the above commands.