Markdown Mode

Insert and normal behavior

Markdown mode adds guarded key behavior:

  • Enter in Insert mode continues list markers and checkboxes on list lines
  • o in Normal mode adds a new list item when on a list line

md-goto-definition follows:

  • http:// and https:// URLs
  • Markdown links
  • wiki links like [[target]]
  • relative file paths (with .md fallback)

Heading navigation and heading picker use tree-sitter Markdown nodes.

Inline previews

Images

![alt](path) previews render inline from local paths or URLs.

Mermaid

Fenced ```mermaid blocks render to inline textures when mmdc is available on PATH.

Transclusion

![[target]] and ![[target#heading]] render referenced content inline.

  • max lines per embed: 30
  • max nested depth: 3

Knowledge features

  • clickable #tags from text and frontmatter
  • backlinks index (;B) for wiki links pointing to current note
  • unlinked reference search (:u) based on current title
  • project notes helper (;W)

Callouts

Blockquotes starting with > [!type] render with callout styling. Supported aliases include note, tip, important, warning, caution, quote, info, todo, bug, danger, failure, and success.

Word count and frontmatter

Markdown buffers expose word metrics in the modeline, including selection and session delta.

Frontmatter is parsed and cached for:

  • title
  • tags
  • word-goal
  • PDF export keys (document-class, paper-size, font-size, line-spacing, margins, font, top-level-division, open-after-export)