Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/letstri/druk/llms.txt

Use this file to discover all available pages before exploring further.

Druk can render any .md file as a formatted document directly inside the terminal — headings, lists, tables, links, block quotes, and syntax-highlighted code blocks, all without leaving the editor. Switching between the rendered view and the raw source is a single keystroke, and the two share the same tab rather than opening a new one. Because Druk renders the buffer rather than the saved file, you can see how your document will look while you are still writing, before saving.

Toggle Between Rendered and Source

Press Ctrl+Opt+M to switch the active Markdown tab between its rendered and source views. Press the same key again to switch back. The rendered tab is marked with a symbol in the tab strip — ¶ README instead of README.md — so you always know which view is active at a glance.
Markdown source editing still uses tree-sitter syntax highlighting — headings, emphasis, code spans, and link syntax are all colored even in the raw source view.
This is not a new tab. It is one tab in two views: the rendered view and the source view share the same buffer, the same undo history, and the same unsaved-changes indicator in the status bar.

What Renders

The rendered view supports all standard Markdown elements:
ElementHow it renders
# HeadingsBold, colored text at the appropriate level
- Lists and 1. Ordered listsIndented with bullet or number markers
| Tables |Aligned columns drawn with box-drawing characters
[Links](url)Underlined text with the URL shown or hidden
> Block quotesIndented with a leading bar
```lang code blocksSyntax highlighted using tree-sitter (same grammars as the editor)
**Bold** and *italic*Bold and italic terminal attributes
Inline codeHighlighted with a distinct background

Editing While Rendered

You do not need to save before the rendered view updates. Druk renders the in-memory buffer, not the file on disk. This means:
  • Type in the source view → the rendered view reflects the latest content the next time you switch to it.
  • Unsaved edits are visible in the rendered view.
  • The rendered view is never stale relative to what you are writing.
This is particularly useful for README-driven development: write and preview iteratively without a constant Ctrl+S in between. The rendered view is read-only and scrollable. Standard navigation keys work just as they do in the rest of the editor.
KeyAction
/ Scroll one line up / down
PgUp / PgDnScroll one page up / down
Ctrl+UScroll half a page up
Ctrl+DScroll half a page down
Tab or EscReturn to the source view

Per-File Memory

Each Markdown file remembers which view it was in when you last closed it. If you left CHANGELOG.md in the rendered view, it will open in the rendered view next time — even across Druk restarts. Source files you never toggled always open in source view.

Build docs developers (and LLMs) love