Rendered Markdown

Toggle rendered Markdown for the focused Markdown buffer with <space>tm or Toggle Markdown Renderer in the command palette. Named-file choices persist across sessions. Editable file comparisons continue to show source text.

Kvim home

Rendering changes presentation, not buffer contents. Source positions, search, yanks, undo, and language-server requests retain their original meaning. Putting the cursor or a visual selection inside a rendered component reveals that component's source for editing; unrelated components remain rendered.

Heading hierarchy

Rendered ATX and Setext headings show a compact # through ###### level cue. Heading text retains its theme's level-specific color, levels one and two are bold, and level one has a subtle background across its display rows. Closing ATX hashes and Setext underlines are concealed. A concealed underline retains its source row rather than changing line numbering.

Heading cues participate in wrapping and mouse/cursor mapping. Section bodies are not indented, and rendering does not add spacer rows or change source whitespace.

Inline HTML and custom wrappers

Starting with 0.22.0, balanced inline HTML can render its contents without showing the surrounding tags. For example:

Use <nax-source-link path="src/solver.cpp"><code>Solver::CreateContext</code></nax-source-link> as a starting point.

This displays Use Solver::CreateContext as a starting point., with the symbol styled as inline code. The attribute and tags remain in the source and become visible when editing the construct. Arbitrary path and href attributes do not trigger file opens, network requests, or link activation.

Inline construct Presentation
Paired custom wrappers and ordinary inline containers such as span All child text and siblings, in source order
code, kbd, samp Inline code; Markdown punctuation stays literal
strong, b Bold
em, i Italic
a Link-colored text, without automatic navigation
&amp;, &lt;, &gt;, &quot;, &apos;, &nbsp; Decoded character
Valid decimal/hexadecimal numeric character references Decoded Unicode scalar, excluding terminal controls and directional controls

Nested supported styles compose. Character references are decoded once; decoded angle brackets are never reparsed as tags. Markdown code spans and fenced code blocks remain literal, including their HTML and references.

This is a conservative inline subset, not a browser or MDX runtime:

HTML processing is bounded to 64 KiB inline fragments, 1,024 tag/reference captures per fragment, and 32 nested tags. Over-limit HTML remains literal. Tag names are limited to 64 ASCII bytes; a longer name leaves its inline fragment literal rather than partially rendering nested elements. If a replacement cannot preserve grapheme-safe source mapping, the affected line uses its source representation.