md-viewer-0.1.2 is not a library.
md-viewer
A fast, lightweight markdown viewer for Linux built with Rust and egui. Designed for distraction-free reading with excellent typography and syntax highlighting.

Features
Rendering
- GitHub Flavored Markdown - Full GFM support including tables, task lists, and footnotes
- Syntax Highlighting - 200+ languages via syntect with beautiful color schemes
- Mermaid Diagrams - Flowcharts, sequence diagrams, and more rendered natively via merman (click to enlarge)
- HTML Tables - Rendered as formatted grids with proper cell padding
- Images & SVG - Embedded and remote image support (PNG, JPEG, GIF, SVG, HTTP URLs)
- Unicode Support - System font fallbacks (Noto, DejaVu) for emojis, CJK, and non-Latin scripts
- 60 FPS Rendering - Smooth scrolling with viewport-based lazy rendering
- Typography - 1.5x line height for optimal readability (WCAG 2.1 compliant)
Navigation
- Tab System - Open multiple documents with tab bar (Ctrl+Click links to open in new tab)
- File Explorer - Hierarchical sidebar with lazy-loading directories and sorting options
- Outline Sidebar - Click-to-navigate table of contents from document headers
- Navigation Buttons - Back/forward buttons in title bar for quick history navigation
- Per-Tab History - Independent back/forward navigation within each tab (Alt+Left/Right)
- Internal Links - Navigate between markdown files with relative links
View
- Dark & Light Themes - Toggle with Ctrl+D
- Zoom - 50% to 300% zoom (Ctrl++/-/0 or Ctrl+Scroll)
- Live Reload - Auto-refresh on file changes (enabled by default)
Usability
- Drag and Drop - Drop markdown files onto the window to open
- Native Dialogs - System file picker integration
- Session Persistence - Remembers open tabs, theme, zoom, and sidebar state
- Cross-Platform - Works on X11 and Wayland
Screenshots
Dark Mode
File explorer, mermaid diagrams, and document outline

Light Mode
Clean light theme with the same powerful features

Syntax Highlighting
200+ languages with semantic coloring for keywords, types, and comments

Tables
Markdown tables and HTML tables rendered as formatted grids

Keyboard Shortcuts
Tab Management
| Shortcut | Action |
|---|---|
| Ctrl+T | New tab (open file dialog) |
| Ctrl+W | Close current tab |
| Ctrl+Tab | Next tab |
| Ctrl+Shift+Tab | Previous tab |
| Ctrl+1-9 | Switch to tab 1-9 |
Navigation
| Shortcut | Action |
|---|---|
| Ctrl+O | Open file dialog |
| Alt+Left | Navigate back in history |
| Alt+Right | Navigate forward in history |
| Click link | Navigate in current tab |
| Ctrl+Click link | Open link in new tab |
View
| Shortcut | Action |
|---|---|
| Ctrl+D | Toggle dark/light mode |
| Ctrl+Shift+E | Toggle file explorer |
| Ctrl+Shift+O | Toggle outline sidebar |
| Ctrl++ / Ctrl+= | Zoom in |
| Ctrl+- | Zoom out |
| Ctrl+0 | Reset zoom to 100% |
| Ctrl+Scroll | Zoom with mouse wheel |
File Operations
| Shortcut | Action |
|---|---|
| F5 | Toggle file watching |
| Ctrl+Q | Quit application |
Installation
Arch Linux (AUR)
# Using yay
# Using paru
Snap Store
Cargo (crates.io)
From Source
# Clone the repository
# Build release binary
# Install to ~/.local/bin (optional)
System Dependencies (Arch Linux)
Usage
# Open a file (live reload is enabled by default)
# Disable live reload
Technical Details
- Binary size: ~8.7 MB (includes syntax highlighting, image support, X11+Wayland)
- Startup time: < 200ms
- Rendering: 60 FPS with viewport-based clipping
- Memory: Uses mimalloc for improved allocation performance
- Platform: Linux (X11 and Wayland via glow backend)
Built With
- eframe/egui - Immediate mode GUI framework
- egui_commonmark - Markdown rendering (vendored fork with typography improvements)
- merman - Mermaid diagram rendering
- syntect - Syntax highlighting
- notify - File watching
- rfd - Native file dialogs
License
MIT