A comprehensive test file for all mdterm features. Open with mdterm test.md and try the keybindings listed below.
Regular text, bold text, italic text, strikethrough text, and inline code.
Combine them: bold italic, bold strikethrough, italic strikethrough.
Visit Rust or check out mdterm on GitHub.
Multiple links: Google, Wikipedia, Hacker News.
Same-target links: readme 1 and readme 2 — both point to README.md but have different text. Only the text should show inline. Press f to see both entries with text and URL.
Press f to open the link picker and jump to any link.
Inline math:
The quadratic formula:
Greek letters:
Display math:
Toggle line numbers with l. Copy a code block with c.
use std::collections::HashMap;
fn main() {
let mut scores: HashMap<&str, i32> = HashMap::new();
scores.insert("Alice", 95);
scores.insert("Bob", 87);
scores.insert("Charlie", 92);
for (name, score) in &scores {
println!("{}: {}", name, score);
}
}import asyncio
async def fetch_data(url: str) -> dict:
"""Fetch data from a URL asynchronously."""
await asyncio.sleep(1)
return {"url": url, "status": 200}
async def main():
urls = ["https://api.example.com/a", "https://api.example.com/b"]
tasks = [fetch_data(url) for url in urls]
results = await asyncio.gather(*tasks)
for r in results:
print(f"{r['url']} -> {r['status']}")
asyncio.run(main())const debounce = (fn, ms) => {
let timer;
return (...args) => {
clearTimeout(timer);
timer = setTimeout(() => fn(...args), ms);
};
};package main
import "fmt"
func fibonacci(n int) int {
if n <= 1 {
return n
}
return fibonacci(n-1) + fibonacci(n-2)
}
func main() {
for i := 0; i < 10; i++ {
fmt.Printf("fib(%d) = %d\n", i, fibonacci(i))
}
}graph TD
A[Start] --> B{Decision}
B -->|Yes| C[Action 1]
B -->|No| D[Action 2]
C --> E[End]
D --> E
- First item
- Second item
- Nested item A
- Nested item B
- Deeply nested
- Third item
- Step one
- Step two
- Sub-step A
- Sub-step B
- Step three
- Clickable links (OSC 8)
- Heading outline / TOC (
okey) - Follow mode (
--follow) - Stdin support (
cat file | mdterm) - Image placeholders
- Heading jumps (
[/]) - Link picker (
fkey) - Copy to clipboard (
y/Y/c) - Multiple files (
Tab/Shift+Tab) - CLI flags (
--help,--version, etc.) - Config file (
~/.config/mdterm/config.toml) - Line numbers (
lkey or--line-numbers) - Code block copy (
ckey) - Regex search (
/with patterns) - Scrollbar
- Mermaid/diagram detection
- Slide mode (
--slides) - HTML export (
--export html) - Fuzzy heading search (
:key) - Math rendering (LaTeX to Unicode)
- Even more features to come!
- Buy groceries
- Write documentation
- Fix login bug
- Review pull request
- Set up CI/CD pipeline
- Update dependencies
- Schedule team meeting
- Deploy to staging
"The only way to do great work is to love what you do." — Steve Jobs
Blockquotes can contain formatting,
code, and even nested emphasis within them.
| Feature | Keybinding | Description |
|---|---|---|
| Scroll | j/k |
Line by line |
| Page | Space/b |
Full viewport |
| Search | / |
Regex-enabled search |
| TOC | o |
Table of contents overlay |
| Links | f |
Open links in browser |
| Copy | y/Y |
Section / full document |
| Heading Jump | [/] |
Previous / next heading |
| Theme | t |
Toggle dark/light |
| Line Numbers | l |
Toggle code line numbers |
| Fuzzy Search | : |
Search headings |
| Quit | q |
Exit viewer |
| Alignment Test | Left | Center | Right |
|---|---|---|---|
| Row 1 | L1 | C1 | R1 |
| Row 2 | L2 | C2 | R2 |
| Row 3 | L3 | C3 | R3 |
| Links in Tables | URL |
|---|---|
| Internal anchor | Jump to Math |
| External link | Crates.io |
| Another external | Docs.rs |
Content above the rule.
Content between rules. In slide mode (mdterm --slides test.md), each --- becomes a slide boundary. Use arrow keys to navigate between slides.
More content after another rule.
Try searching (/) for these terms:
- "fibonacci" — finds it in code blocks
- "feature" — finds multiple matches
- "[a-z]+ing" — regex pattern matching words ending in "ing"
- "TODO" — no match, shows "no match" indicator
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Curabitur pretium tincidunt lacus. Nulla gravida orci a odio. Nullam varius, turpis et commodo pharetra, est eros bibendum elit, nec luctus magna felis sollicitudin mauris. Integer in mauris eu nibh euismod gravida.
Duis ac tellus et risus vulputate vehicula. Donec lobortis risus a elit. Etiam tempor. Ut ullamcorper, ligula ut dictum pharetra, nisi nunc fringilla magna, in commodo elit erat nec turpis. Ut pharetra purus quis id congue.
Praesent dapibus, neque id cursus faucibus, tortor neque egestas auguae, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus.
Test relative file links — press f and select one, or click directly:
- Linked Page — opens a local markdown file in the viewer
- Linked Page (with ./) — same file with explicit relative path
- Jump to anchor in linked file — opens file and scrolls to heading
- README — opens the project README
- nonexistent.md — this should show "unsupported URL scheme" (file doesn't exist)
You've reached the bottom! Try these:
- Press
gto jump back to top - Press
oto see the table of contents - Press
:to fuzzy-search a heading - Press
tto toggle dark/light theme - Press
qto quit
Built with Rust, rendered with love.

