原文
mdvi is a terminal markdown viewer with Vim-style navigation.
It renders markdown into a polished full-screen TUI with fast keyboard navigation, clear typography, and predictable behavior for large files.
- Full-screen terminal viewer (
crossterm+ratatui) - Vim-style navigation controls
- High-quality markdown rendering via
pulldown-cmark - Support for:
- headings
- lists and task lists
- blockquotes
- code blocks and inline code
- links, tables, footnotes, emphasis/strong/strikethrough
- Live reload (
r) when the file changes on disk - Start at specific line (
--line) - Works with standard terminal keys (arrows, page up/down, home/end)
brew tap taf2/tap
brew install mdviExamples:
mdvi docs/spec.md
mdvi --line 120 CHANGELOG.mdj/Down: scroll down one linek/Up: scroll up one lineCtrl-d: half-page downCtrl-u: half-page upPageDown: full-page downPageUp: full-page upCtrl-f: full-page down (Vim-style)Ctrl-b: full-page up (Vim-style)g/Home: jump to topG/End: jump to bottomr: reload file from disk/: start searchn: next search matchN: previous search match?: toggle help lineq: quit
Rust is a strong fit for a serious CLI viewer:
- precise terminal control
- excellent performance for large files
- single static binary distribution
- mature ecosystem for TUI and markdown parsing
cargo test
cargo fmt
cargo clippy -- -D warningsMIT