Reference
Complete CLI reference
Every command-line option, its format, accepted values and behavior.
Output and workflow
--html
Prints HTML instead of terminal formatting.
--render-html
-E, --render-html
Renders raw HTML fragments as terminal-formatted content instead of displaying their tags literally.
- HTML nesting is limited to 64 DOM elements.
Output preview
Embedded HTML
mdv --no-config --theme catppuccin --cols 64 example.md<details>
<summary>Details</summary>
<p>A <strong>formatted</strong> paragraph.</p>
</details>
Markdown source
<details>
<summary>Details</summary>
<p>A <strong>formatted</strong> paragraph.</p>
</details>
--line-numbers
-N, --line-numbers [<MODE>]
Prefixes terminal and pager rows with line numbers.
- Without a mode, it numbers rendered rows
sourceuses physical Markdown source linesseparatoradds a separator"source;separator"combines both.
Output preview
Document line numbers
mdv --no-config --theme catppuccin --cols 64 example.md Example
A paragraph long enough to wrap into multiple rendered rows at
the selected terminal width.
Last paragraph.
Markdown source
## Example
A paragraph long enough to wrap into multiple rendered rows at the selected terminal width.
Last paragraph.
--color
--color <auto|always|never>
Controls terminal styling.
autoenables ANSI and OSC 8 only when stdout is a terminalalwayspreserves styling through pipesneveremits plain rendered output.
Output preview
Terminal styling
mdv --no-config --theme catppuccin --cols 64 --color always example.mdEmphasis, strong text, both.
Inline `code`, removed and highlighted text.
Markdown source
*Emphasis*, **strong text**, ***both***.
Inline `code`, ~~removed~~ and ==highlighted== text.
--color-depth
--color-depth <auto|16|256|truecolor>
Detects the terminal palette or sets its limit explicitly.
- Applies to document colors and the interactive interface; default
auto.
Output preview
Terminal color depth
mdv --no-config --theme catppuccin --cols 64 --color-depth 16 example.mdExample
Read Markdown with `mdv`.
╭─ Note ─────────────────────╮
│ Terminal document preview. │
╰────────────────────────────╯
fn main() {
println!("hello, mdv");
}
Open the guide.
Markdown source
# Example
Read **Markdown** with `mdv`.
> [!NOTE]
> Terminal document preview.
```rust
fn main() {
println!("hello, mdv");
}
```
Open the [guide](https://example.org/guide).
--hide-comments
Removes Markdown comments from the rendered output.
Output preview
Comment visibility
mdv --no-config --theme catppuccin --cols 64 example.mdVisible text.
<!-- An internal comment. -->
More text.
Markdown source
Visible text.
<!-- An internal comment. -->
More text.
--front-matter
--front-matter <hidden|panel|table|plain|inline|blocks|code|source>
Controls an exact ----delimited YAML property mapping beginning on the first line.
hiddenomits itpanelrenders a property paneltableuses Property/Value columnsplainemits normalized key/value linesinlinejoins properties into one flowing rowblocksplaces each value below its keycoderenders highlighted YAMLsourceparses the complete input as ordinary Markdown.
Output preview
Front matter display
mdv --no-config --theme catppuccin --cols 64 --front-matter hidden example.md Start
Read the document.
Markdown source
---
title: Guide
author: Alice
tags: [docs, terminal]
---
## Start
Read the document.
--theme-info
--theme-info [FILE]
Shows the active palette; when FILE is provided it renders the file along with palette information.
--from
--from <TEXT>
Starts rendering from the first match of <TEXT>.
- Adding
:<lines>limits the number of lines (for example--from "Install:20").
--reverse
-r, --reverse
Renders the document starting from the end while keeping block formatting intact.
Output preview
Reading direction
mdv --no-config --theme catppuccin --cols 64 example.md First section
First paragraph.
Second paragraph.
Next section
Keep reading.
Markdown source
## First section
First paragraph.
Second paragraph.
## Next section
Keep reading.
--pager
-p, --pager[=<COMMAND>]
Opens the rendered output in a pager.
- A bare flag uses
MDV_PAGERwhen set and the default pager otherwise. --pager=defaultselects the default backend (currently the built-inminus)--pager=builtinexplicitly selectsminus, and a command such as--pager="less -R"receives the rendered output on stdin.
Preview the built-in pager
Built-in pager
The document scrolls inside the terminal. The footer shows its position.
mdv --no-config --theme catppuccin --wrap word --pager=builtin README.md
mdv guide
Read Markdown right in your terminal.
Installation
Install mdv and open any Markdown document.
cargo install mdv
mdv README.md
Themes
Choose a theme for the document and interface.
mdv --theme catppuccin README.md
Presets
The reader preset provides comfortable reading defaults.
MDV README.md 0% ? Help Markdown source
# mdv guide
Read Markdown right in your terminal.
## Installation
Install mdv and open any Markdown document.
```sh
cargo install mdv
mdv README.md
```
## Themes
Choose a theme for the document and interface.
```sh
mdv --theme catppuccin README.md
```
### Presets
The reader preset provides comfortable reading defaults.
## Navigation
Use search, the outline and line numbers.
- Find the section you need.
- Select text to copy.
- Return to reading the document.
## Links
Open the [documentation](https://example.org/docs).
--interactive
-i, --interactive
Opens the interactive document browser.
- A directory opens the browser; a file or standard input opens the document directly in the selected pager.
- Running
mdvwithout arguments in a terminal opens the current directory, and passing a directory opens that directory. - Redirected output does not open the browser implicitly.
- The browser recursively finds Markdown files while honoring hidden-file and
.gitignorerules.
Preview the document browser
Document browser
Choose a Markdown file. Enter opens it in the pager.
mdv --no-config --theme catppuccin -i docs/
MDV
8 documents
│ CHANGELOG.md
│ 8 hours ago
README.md
1 hour ago
examples/code.md
6 hours ago
examples/tables.md
7 hours ago
••
h/l ←/→ page • / find • . show ignored • r refresh • e edit • q quit • …
Example files
docs/
README.md
guides/installation.md
guides/themes.md
guides/presets.md
guides/navigation.md
examples/code.md
examples/tables.md
CHANGELOG.md--monitor
Watches the source file and re-renders when it changes.
--config-file
-F, --config-file <CONFIG_DIR>
Reads configuration from the provided directory.
--preset
-P, --preset <NAME>
Applies a built-in or user preset above the configuration file and below explicit CLI options.
Output preview
Reading presets
mdv --no-config --cols 64 example.mdExample
Read Markdown with `mdv`.
╭─ Note ─────────────────────╮
│ Terminal document preview. │
╰────────────────────────────╯
fn main() {
println!("hello, mdv");
}
Open the guide.
Markdown source
# Example
Read **Markdown** with `mdv`.
> [!NOTE]
> Terminal document preview.
```rust
fn main() {
println!("hello, mdv");
}
```
Open the [guide](https://example.org/guide).
--preset-info
Lists available presets when no positional FILE is provided.
mdv --preset-info FILE --preset NAMErenders the document and printsCurrent preset: NAME; withFILEbut no--preset, the flag does not alter rendering.
--no-config
-n, --no-config
Skips config.yaml/config.yml; presets remain available.
--init-config
--init-config [CONFIG_DIR]
Creates the default config file.
- Uses the provided directory
--config-fileMDV_CONFIG_PATH, or the default config directory.
Theming
--theme
-t, --theme <NAME>
Chooses a built-in or user theme (default terminal).
Output preview
Document palette
mdv --no-config --theme terminal --cols 64 example.mdExample
Read Markdown with `mdv`.
╭─ Note ─────────────────────╮
│ Terminal document preview. │
╰────────────────────────────╯
fn main() {
println!("hello, mdv");
}
Open the guide.
Markdown source
# Example
Read **Markdown** with `mdv`.
> [!NOTE]
> Terminal document preview.
```rust
fn main() {
println!("hello, mdv");
}
```
Open the [guide](https://example.org/guide).
--code-theme
-T, --code-theme <NAME>
Selects a separate syntax palette.
- Without an explicit selection, code follows the document theme.
Output preview
Independent code palette
mdv --no-config --theme catppuccin --cols 64 --code-theme terminal example.md fn main() {
println!("hello, mdv");
}
Markdown source
```rust
fn main() {
println!("hello, mdv");
}
```
--syntaxes-dir
--syntaxes-dir <DIR>
Recursively loads custom .sublime-syntax files on top of the embedded syntax set.
- Custom entries take precedence over matching built-in syntaxes.
--code-block-style
-b, --code-block-style <basic|simple|pretty>[:show-name;show-icon]
Selects an indented borderless block, a single gutter, or a boxed frame.
- Labels are hidden by default
show-namedisplays the language nameshow-icondisplays its icon, and both options may be combined (defaultbasic).
Output preview
Code block frame
mdv --no-config --theme catppuccin --cols 64 --code-block-style basic example.md fn main() {
println!("hello, mdv");
}
Markdown source
```rust
fn main() {
println!("hello, mdv");
}
```
Code labels and icons
Hidden labels, a language name, an icon, or both.
mdv --no-config --theme catppuccin --cols 64 --code-block-style pretty example.md╭─────────────────────────────╮
│ fn main() { │
│ println!("hello, mdv"); │
│ } │
╰─────────────────────────────╯
Markdown source
```rust
fn main() {
println!("hello, mdv");
}
```
--math-block-style
--math-block-style <basic|simple|pretty>
Selects the presentation for display formulas and fenced math/latex/tex blocks.
Output preview
Math block frame
mdv --no-config --theme catppuccin --cols 64 --math-block-style basic example.md a+b
─── = √(x² + 1)
c
Markdown source
$$
\frac{a+b}{c} = \sqrt{x^2 + 1}
$$
--code-line-numbers
-K, --code-line-numbers [<MODE>]
Numbers rows inside each code block.
- Without a mode, every wrapped terminal row is numbered
sourcenumbers physical code lines and leaves wrapped continuations unnumberedseparatoradds a separator"source;separator"combines both modes.
Output preview
Code line numbers
mdv --no-config --theme catppuccin --cols 44 example.md fn main() {
let message = "A long line of code tha
t wraps to the available terminal wi
dth";
println!("{message}");
}
Markdown source
```rust
fn main() {
let message = "A long line of code that wraps to the available terminal width";
println!("{message}");
}
```
--custom-theme
--custom-theme <key=value;...>
Overrides UI colors on top of the selected theme.
Output preview
Theme color overrides
mdv --no-config --theme catppuccin --cols 64 example.mdExample
Read Markdown with `mdv`.
╭─ Note ─────────────────────╮
│ Terminal document preview. │
╰────────────────────────────╯
fn main() {
println!("hello, mdv");
}
Open the guide.
Markdown source
# Example
Read **Markdown** with `mdv`.
> [!NOTE]
> Terminal document preview.
```rust
fn main() {
println!("hello, mdv");
}
```
Open the [guide](https://example.org/guide).
--inline-style
--inline-style <STYLES>
Overrides decorations for emphasis
strongstrong_emphasiscodestrikethroughhighlight.- Use
element:property=true,property=falseentries separated by;; properties arebackticks bolditalicunderlinestrikethrough(for example--inline-style 'code:backticks=false,bold=true;highlight:underline=true').
Output preview
Inline decorations
mdv --no-config --theme catppuccin --cols 64 example.mdEmphasis, strong text, both.
Inline `code`, removed and highlighted text.
Markdown source
*Emphasis*, **strong text**, ***both***.
Inline `code`, ~~removed~~ and ==highlighted== text.
--custom-code-theme
--custom-code-theme <key=value;...>
Overrides syntax colors using the same format as --custom-theme.
Output preview
Syntax color overrides
mdv --no-config --theme catppuccin --cols 64 example.md fn main() {
println!("hello, mdv");
}
Markdown source
```rust
fn main() {
println!("hello, mdv");
}
```
--custom-code-block
--custom-code-block <lang:icon=...,label=...,aliases=...|...>[;...]
Overrides the icon, label, and aliases for specific code block languages.
- Multiple languages are separated by
;, options within one language by,, and aliases by|(for example python:icon=*,label=Python,aliases=py|py3;rust:icon=R).- Works for any language hint, even if it is not in the built-in icon mapping.
- Syntax highlighting is applied only when the language is supported by mdv’s syntax highlighting logic.
- Use
default:icon=...to set the fallback icon for unknown languages.
Output preview
Custom code labels
mdv --no-config --theme catppuccin --cols 64 --code-block-style 'pretty:show-name;show-icon' example.md╭─ Rust ────────────────────╮
│ fn main() { │
│ println!("hello, mdv"); │
│ } │
╰─────────────────────────────╯
Markdown source
```rust
fn main() {
println!("hello, mdv");
}
```
Callouts
--callout-style
-C, --callout-style <pretty|simple>[:show-icons;show-simple-icons;fold-icons;label-inside;uppercase]
Sets the callout layout and label behavior.
show-iconsuses Nerd Font glyphsshow-simple-iconsuses portable ASCII markers such as[i][*][!][x].- The two icon options cannot be combined.
label-insideis only supported withprettyfold-iconsrequiresshow-icons.
Output preview
Callout layout
mdv --no-config --theme catppuccin --cols 64 --callout-style pretty example.md╭─ Note ──────────────────────────╮
│ Read Markdown in your terminal. │
╰─────────────────────────────────╯
╭─ Tip ──────────────────────────────╮
│ Choose a theme for your workspace. │
╰────────────────────────────────────╯
Markdown source
> [!NOTE]
> Read Markdown in your terminal.
> [!TIP]
> Choose a theme for your workspace.
Callout icons
No icons, ASCII markers, or Nerd Font icons.
mdv --no-config --theme catppuccin --cols 64 --callout-style pretty example.md╭─ Note ──────────────────────────╮
│ Read Markdown in your terminal. │
╰─────────────────────────────────╯
╭─ Tip ──────────────────────────────╮
│ Choose a theme for your workspace. │
╰────────────────────────────────────╯
Markdown source
> [!NOTE]
> Read Markdown in your terminal.
> [!TIP]
> Choose a theme for your workspace.
Callout title position
mdv --no-config --theme catppuccin --cols 64 --callout-style pretty example.md╭─ Note ──────────────────────────╮
│ Read Markdown in your terminal. │
╰─────────────────────────────────╯
╭─ Tip ──────────────────────────────╮
│ Choose a theme for your workspace. │
╰────────────────────────────────────╯
Markdown source
> [!NOTE]
> Read Markdown in your terminal.
> [!TIP]
> Choose a theme for your workspace.
Callout title case
mdv --no-config --theme catppuccin --cols 64 --callout-style pretty example.md╭─ Note ──────────────────────────╮
│ Read Markdown in your terminal. │
╰─────────────────────────────────╯
╭─ Tip ──────────────────────────────╮
│ Choose a theme for your workspace. │
╰────────────────────────────────────╯
Markdown source
> [!NOTE]
> Read Markdown in your terminal.
> [!TIP]
> Choose a theme for your workspace.
Fold indicator
mdv --no-config --theme catppuccin --cols 64 --callout-style 'pretty:show-icons' example.md╭─ Details ───────────────────────╮
│ Terminal content remains visible. │
╰───────────────────────────────────╯
Markdown source
> [!NOTE]- Details
> Terminal content remains visible.
--custom-callout
--custom-callout <name:icon=...,color=...;...>
Overrides or adds callout labels.
-
iconandcolorare optional; color formats match--custom-theme. -
A Nerd Font is required in the terminal for icons enabled by
show-iconsandfold-iconsto render correctly.show-simple-iconsdoes not require a Nerd Font.
Output preview
Custom callout color
mdv --no-config --theme catppuccin --cols 64 example.md╭─ Note ──────────────────────────╮
│ Read Markdown in your terminal. │
╰─────────────────────────────────╯
╭─ Tip ──────────────────────────────╮
│ Choose a theme for your workspace. │
╰────────────────────────────────────╯
Markdown source
> [!NOTE]
> Read Markdown in your terminal.
> [!TIP]
> Choose a theme for your workspace.
Checkboxes
--checkbox-style
-x, --checkbox-style <square|circle>
Renders task-list checkboxes as Nerd Font icons instead of the default [ ] / [x] markers.
- Requires a Nerd Font in the terminal.
Output preview
Task-list checkboxes
mdv --no-config --theme catppuccin --cols 64 example.md[ ] Read the guide
[✓] Install mdv
Markdown source
- [ ] Read the guide
- [x] Install mdv
--custom-checkbox
--custom-checkbox <PAIRS>
Overrides built-in checkbox icons or adds new states (only with --checkbox-style).
-
Each semicolon-separated pair is either
<char>:<icon>[:<color>]or<char>:<color>. -
The color-only form keeps an existing icon or uses the default unchecked icon for a new state.
-
Colors accept named, hex, rgb
-
ansi(N)values. -
Override:
--custom-checkbox ' :!'replace the unchecked icon -
Add:
--custom-checkbox '*:*'add a new[*]checkbox state -
Color:
--custom-checkbox ' :!:yellow'or#ff0000,128,1,1,ansi(200) -
Color only:
--custom-checkbox '?:red'keeps the Nerd Font icon for the?state and applies red. -
New state, color only:
--custom-checkbox '*:yellow'uses the default unchecked icon and applies yellow.
Output preview
Custom task states
mdv --no-config --theme catppuccin --cols 64 --checkbox-style square example.md Read the guide
Install mdv
[*] Review settings
Ask a question
Markdown source
- [ ] Read the guide
- [x] Install mdv
- [*] Review settings
- [?] Ask a question
Lists
--list-style
-L, --list-style <style>
Replaces the default - unordered-list markers with a level-aware icon set.
-
The value is required and uses the format
type:<nerd-font|unicode>;size:<large|small>, for example--list-style 'type:unicode;size:small'. -
sizechanges only Nerd Font markers. Unicode accepts either value but renders the same markers; their spacing may vary by font. Verified with Nerd Font families, especially JetBrainsMono Nerd Font.
Output preview
Nested list markers
mdv --no-config --theme catppuccin --cols 64 example.md- Documents
- Guides
- Installation
- Linux
- Examples
Markdown source
- Documents
- Guides
- Installation
- Linux
- Examples
--definition-marker-style
-D, --definition-marker-style <unicode|nerd-font>
Renders definition descriptions with a built-in Unicode or Nerd Font marker.
Output preview
Definition markers
mdv --no-config --theme catppuccin --cols 64 example.mdTheme
Colors for a document.
Preset
A reusable group of settings.
Markdown source
Theme
: Colors for a document.
Preset
: A reusable group of settings.
--uniform-list-marker
--uniform-list-marker <level:1-4|icon:glyph>
Uses one marker at every nesting level (only with --list-style).
level:2reuses level 2 from the selected seticon:*uses a custom glyph.
Output preview
Uniform markers
mdv --no-config --theme catppuccin --cols 64 --list-style 'type:unicode;size:small' example.md⦁ Documents
▪ Guides
⚬ Installation
▫ Linux
⦁ Examples
Markdown source
- Documents
- Guides
- Installation
- Linux
- Examples
--custom-list
--custom-list <level>:<icon>[:<color>];...
Overrides the marker icon and/or color for specific nesting levels (only with --list-style).
-
Level is 1-based; icon is the marker glyph.
-
Colors accept named (
red), hex (#ff0000), rgb (255,0,0) -
ansi(N)values. -
Icon + color:
--custom-list '1:*:yellow'marker*in yellow -
Icon only:
--custom-list '1:>'marker>in theme color -
Color only:
--custom-list '1:red'keep built-in icon, red color
Output preview
Custom list colors
mdv --no-config --theme catppuccin --cols 64 --list-style 'type:unicode;size:small' example.md⦁ Documents
▪ Guides
⚬ Installation
▫ Linux
⦁ Examples
Markdown source
- Documents
- Guides
- Installation
- Linux
- Examples
Layout and wrapping
--cols
-c, --cols <N>
Enforces the output width.
- Without it, mdv uses a detected terminal width of at least 20 columns, then configured
cols, then 80 columns.
Output preview
Output width
mdv --no-config --theme catppuccin --cols 40 --wrap word example.mdA Markdown viewer keeps a long paragraph
readable while you change the terminal
width. Each option controls how these
words are arranged without changing the
document.
Markdown source
A Markdown viewer keeps a long paragraph readable while you change the terminal width. Each option controls how these words are arranged without changing the document.
--margin
-m, --margin <right:N;left:N>
Reserves separate left and right terminal margins.
- An omitted side defaults to
0.
Output preview
Horizontal margins
mdv --no-config --theme catppuccin --cols 64 example.mdA Markdown viewer keeps a long paragraph readable while you chan
ge the terminal width. Each option controls how these words are
arranged without changing the document.
Markdown source
A Markdown viewer keeps a long paragraph readable while you change the terminal width. Each option controls how these words are arranged without changing the document.
--tab-length
--tab-length <N>
Replaces tab characters with N spaces (default 4).
Output preview
Tab expansion
mdv --no-config --theme catppuccin --cols 64 --tab-length 2 example.md name status
mdv ready
Markdown source
```text
name status
mdv ready
```
--wrap
-w, --wrap <char|word|none>
Selects the break strategy for text, code, callouts, and table cells (default char).
Output preview
Line wrapping
mdv --no-config --theme catppuccin --cols 40 --wrap char example.mdA Markdown viewer keeps a long paragraph
readable while you change the terminal w
idth. Each option controls how these wor
ds are arranged without changing the doc
ument.
Markdown source
A Markdown viewer keeps a long paragraph readable while you change the terminal width. Each option controls how these words are arranged without changing the document.
--reflow
Collapses in-paragraph source newlines (soft breaks) and refills each line to the wrap width, so hard-wrapped source reflows to fit smaller screens.
- Requires wrapping to be enabled; hard breaks are preserved.
Output preview
Paragraph reflow
mdv --no-config --theme catppuccin --cols 64 --wrap word example.mdThis paragraph was wrapped
in the source file.
The reader can join its
soft line breaks together.
Markdown source
This paragraph was wrapped
in the source file.
The reader can join its
soft line breaks together.
--table-wrap
-W, --table-wrap <fit|wrap|none>
Chooses table geometry: fit cells, split columns into blocks, or allow overflow (default fit).
- Cell breaks still follow
--wrap.
Output preview
Wide tables
mdv --no-config --theme catppuccin --cols 40 --table-wrap fit example.md Name │ Description │ Status
─────────┼─────────────────────┼────────
reader │ Comfortable long-fo │ ready
│ rm reading with wor │
│ d wrapping │
compact │ Dense output for a │ ready
│ narrow terminal wor │
│ kspace │
Markdown source
| Name | Description | Status |
| --- | --- | --- |
| reader | Comfortable long-form reading with word wrapping | ready |
| compact | Dense output for a narrow terminal workspace | ready |
--table-borders
-B, --table-borders
Restores full rounded table borders.
Output preview
Table borders
mdv --no-config --theme catppuccin --cols 64 example.md Name │ Wrap
─────────┼──────
reader │ word
compact │ char
Markdown source
| Name | Wrap |
| --- | --- |
| reader | word |
| compact | char |
--table-smart-indent
-S, --table-smart-indent
Automatic table indent adjustment based on available width.
Output preview
Table indentation
mdv --no-config --theme catppuccin --cols 40 example.md Settings
Name │ Description │ Status
─────────┼─────────────────────┼────────
reader │ Comfortable long-fo │ ready
│ rm reading with wor │
│ d wrapping │
compact │ Dense output for a │ ready
│ narrow terminal wor │
│ kspace │
Markdown source
###### Settings
| Name | Description | Status |
| --- | --- | --- |
| reader | Comfortable long-form reading with word wrapping | ready |
| compact | Dense output for a narrow terminal workspace | ready |
--heading-layout
-H, --heading-layout <level|center|flat|none>
Controls heading indentation (default level).
Output preview
Heading layout
mdv --no-config --theme catppuccin --cols 64 --heading-layout level example.mdGuide
An introduction.
Installation
Install the program.
Usage
Open a document.
Markdown source
# Guide
An introduction.
## Installation
Install the program.
### Usage
Open a document.
--show-heading-markers
Prefixes headings with markdown-style markers matching their level.
Output preview
Heading markers
mdv --no-config --theme catppuccin --cols 64 example.mdGuide
An introduction.
Installation
Install the program.
Usage
Open a document.
Markdown source
# Guide
An introduction.
## Installation
Install the program.
### Usage
Open a document.
--smart-indent
-I, --smart-indent
Smooths indentation jumps between heading levels in level mode.
Output preview
Heading level jumps
mdv --no-config --theme catppuccin --cols 64 example.mdGuide
Introduction.
Details
A level was skipped.
Markdown source
# Guide
Introduction.
#### Details
A level was skipped.
--code-wrap-indent
--code-wrap-indent <none|base|double>
Sets the hanging indent applied to wrapped code block lines (default double).
Output preview
Code continuation indent
mdv --no-config --theme catppuccin --cols 44 --code-wrap-indent none example.md fn main() {
let message = "A long line of code tha
t wraps to the available terminal width";
println!("{message}");
}
Markdown source
```rust
fn main() {
let message = "A long line of code that wraps to the available terminal width";
println!("{message}");
}
```
--block-spacing
--block-spacing <spec>
Overrides top and bottom blank lines per block.
- Omitted sides keep their defaults, and adjacent block gaps collapse to the larger value.
Output preview
Block spacing
mdv --no-config --theme catppuccin --cols 64 example.md First section
First paragraph.
Second paragraph.
Next section
Keep reading.
Markdown source
## First section
First paragraph.
Second paragraph.
## Next section
Keep reading.
--horizontal-rule-style
--horizontal-rule-style <pretty|simple>
Draws Markdown rules and HTML <hr> with decorative endpoints or as a continuous line.
Output preview
Horizontal rules
mdv --no-config --theme catppuccin --cols 64 --horizontal-rule-style pretty example.mdBefore the rule.
◈──────────────────────────────────────────────────────────────◈
After the rule.
Markdown source
Before the rule.
---
After the rule.
Content visibility
--show-empty-elements
Keeps normally hidden empty headings, lists, block quotes, code blocks, and tables in the output.
Output preview
Empty blocks
mdv --no-config --theme catppuccin --cols 64 --code-block-style 'pretty:show-name' example.mdBefore an empty code block.
After the block.
Markdown source
Before an empty code block.
```rust
```
After the block.
--no-code-guessing
Disables heuristic detection of code block languages (unknown blocks remain plain text).
Output preview
Language guessing
mdv --no-config --theme catppuccin --cols 64 example.md #!/usr/bin/env python3
def greet(name):
print(f"Hello, {name}!")
greet("mdv")
Markdown source
```
#!/usr/bin/env python3
def greet(name):
print(f"Hello, {name}!")
greet("mdv")
```
Links
--link-style
-u, --link-style <clickable|fclickable|inline|inlinetable|endtable|hide>
Changes how links are displayed (default clickable).
Output preview
Link presentation
--link-overflow
-l, --link-overflow <wrap|cut|tablecut|none>
Controls whether links wrap, are shortened, or overflow the available width (default wrap).
Output preview
Long URLs
mdv --no-config --theme catppuccin --cols 40 --link-style inline --link-overflow wrap example.mdDocumentation(https://example.org/docume
ntation/terminal/formatting/links-and-fo
otnotes)
Page │ Link
───────┼────────────────────────────────
Guide │ Open(https://example.org/docum
│ entation/terminal/formatting/l
│ inks-and-footnotes)
Markdown source
[Documentation](https://example.org/documentation/terminal/formatting/links-and-footnotes)
| Page | Link |
| --- | --- |
| Guide | [Open](https://example.org/documentation/terminal/formatting/links-and-footnotes) |
Footnotes
--footnote-style
--footnote-style <endnotes|attached>
Places footnotes at the end of the document or immediately after the block that references them, including paragraphs, tables, and list items.
Output preview
Footnote placement
mdv --no-config --theme catppuccin --cols 64 --footnote-style endnotes example.mdFirst statement.[^a]
Another paragraph.
Second statement.[^b]
◇──────────────────────────────────────────────────────────────◇
[^a] First note.
[^b] Second note.
Markdown source
First statement.[^a]
Another paragraph.
Second statement.[^b]
[^a]: First note.
[^b]: Second note.
--missing-footnote-style
--missing-footnote-style <show|hide>
Controls placeholder entries for missing, invalid, or empty footnote definitions.
showrenders a placeholder message in the footnote blockhideomits those entries entirely.
Output preview
Missing definitions
mdv --no-config --theme catppuccin --cols 64 --missing-footnote-style show example.mdA statement with a missing note.[^missing]
◇──────────────────────────────────────────────────────────────◇
[^missing] Missing footnote definition
Markdown source
A statement with a missing note.[^missing]
Information
mdv help
Opens the full mdv --help output in the selected pager.
- It uses
MDV_PAGERwhen set and the built-in pager otherwise; when input or output is redirected, it prints the same help directly.
-h
Shows a concise option summary.
--help
Shows full help with value descriptions, formats, and examples.
--version
-V, --version
Prints the current version.