EmacsWiki: Markdown Mode (original) (raw)

‘markdown-mode’ is a major mode for GNU Emacs which provides syntax highlighting and supporting commands for editing Markdown files. It provides key bindings and commands for inserting Markdown elements and to assist in calling a Markdown processor program to parse the source code or preview the document in a browser. It also, optionally, provides syntax highlighting for wiki links and embedded LaTeX mathematical expressions.

This page covers markdown-mode and packages to work with it.

Manual

There is a manual by the author at the package home page, http://jblevins.org/projects/markdown-mode/, which covers both installation and usage thoroughly. The Emacs package documentation available through C-h P includes the same material.

For greater depth, the author also has an e-book, the “Guide to Markdown Mode for Emacs”, available at https://leanpub.com/markdown-mode.

There is an alterative manual, also extracted from the source code at daniel-birket/markdown-mode-texinfo on GitHub. This version is not authorized by the author of ‘markdown-mode’. It is available in various formats, including Info, PDF and HTML.

Generating tables of contents

markdown-toc – “a simple TOC generator for markdown”

Linting

flymake-markdownlint – is a FlyMake extension for Markdown

Flycheck supports Markdown, as noted in its documentation.

Debugging parentheses

Markdown code can include a lot of parentheses, brackets, etc. that must be balanced. See DebuggingParentheses for how to check this.

Previewing

This is supported via the built-in ‘markdown-live-preview-mode’. This uses a local Markdown processor program to convert Markdown to HTML.

There are other options below, notably ‘impatient-showdown’, which does not require a locally-installed Markdown processor.

impatient-showdown

impatient-showdown provides live previewing without a local program by using a JavaScript library that is downloaded by the generated HTML.

Markdown Preview Mode

Markdown Preview Mode

grip (GitHub)

grip-modeGitHub-flavored Markdown/Org preview using grip

vmd-mode (GitHub)

vmd-mode – Fast Github-flavored Markdown preview using a vmd subprocess.


MarkupModes CategoryModes