A terminal-first Markdown writing tool, in Rust.
Plain UTF-8 text with lightweight markup is canonical. The parse tree is a derived, disposable view — the text always wins. mw does not own layout: it delegates rendering to pandoc → XeLaTeX instead of reimplementing it. Plain text is the feature: line-diffable, greppable, ASCII-clean, yours forever.
Two parsers, two jobs. tree-sitter drives live editing — syntax highlighting, folding, the outline, structural navigation. pandoc does export, and pulldown-cmark renders the instant preview. The editor is fast and TUI-first (ratatui + crossterm), amber-phosphor by default, with matrix-green and WordPerfect-blue themes a keypress away.
tree-sitter Markdown: headings, emphasis, code, links; an outline sidebar (F3), heading jumps, and folding (F4/F5).
F6 serves the in-memory buffer over a loopback port and updates as you type, preserving scroll.
mw build → PDF via pandoc/XeLaTeX (or a project Makefile); also HTML / DOCX / EPUB. F7 builds in the background and jumps to errors.
An mw.toml manifest (compile order, title, bibliography) or a folder of sorted *.md; whole-book build, word count, search.
@key completion from .bib/CSL-JSON, undefined-reference flags, and Ctrl-] go-to-definition for @sec:/@fig:.
ASCII-discipline lint (smart-punctuation → ASCII with Ctrl-L), semantic line breaks, snippets, incremental search.
$…$ / $$…$$ render via KaTeX in preview and XeLaTeX at build; F8 typewriter mode dims everything but the current paragraph.
mw-lsp exposes the same diagnostics, outline, completion, and go-to-def to VS Code / Neovim / Helix.
mw can sign documents and build artifacts with Ed25519 in the
minisign format — interoperable with the stock minisign and
OpenBSD signify. Deliberately not ML-DSA / Dilithium: the
"breakable keys" weakness is a
property of ML-DSA's lattice keys and does not touch Ed25519.
mw keygen # -> ~/.config/mw/minisign.{key,pub}
mw sign report.pdf # -> report.pdf.minisig
mw verify report.pdf # or: minisign -Vm report.pdf -P RWQ…
mw build book/ --sign # build, then sign the artifact
Prebuilt v0.1.0 binaries — each archive holds the editor
mw and the language server mw-lsp:
x86_64 · zip
Verify against the signed checksums (SHA256SUMS,
.minisig). The signature is Ed25519 in the
minisign format, so the stock minisign verifies it too:
curl -O https://mw.itys.net/dl/SHA256SUMS
curl -O https://mw.itys.net/dl/SHA256SUMS.minisig
minisign -Vm SHA256SUMS -P RWS4Ru+xtN2UWVLcfvEG8dobVwp2iWfAGmiWTliTO3Z3DUfvB/A3+Atb
sha256sum -c SHA256SUMS --ignore-missing # or: mw verify SHA256SUMS
PDF export needs pandoc + a XeLaTeX (TeX Live) at runtime. Opening a new file seeds a starter scaffold with the date, author, and filename filled in.
It is a Rust workspace; build the editor mw and the language server
mw-lsp:
git clone https://git.itys.net/mjh/mw
cd mw
cargo build --release
./target/release/mw path/to/file.md # amber theme (default)
./target/release/mw --theme matrix file.md # matrix | wp
Requires a Rust toolchain.
Ctrl-S save · Ctrl-Z/Y undo/redo · Ctrl-F searchCtrl-K/U cut/paste line (nano-style) · Alt-↑/↓ move lineF3 outline · F4/F5 fold · F6 preview · F7 build · F8 focusF2 cycle theme · Ctrl-] go to cross-reference · @ citation completion