Read and edit Markdown

Read and edit Markdown

See tables as grids, links without their URLs, and images in the buffer, while every line stays editable source. Follow links and tick tasks.

How Markdown looks

In Normal mode, Red shows a Markdown file the way it reads. Pipe tables draw as aligned grids, link destinations and brackets, emphasis markers, and code-span backticks take no space, and a line that holds only an image shows the picture. Move onto a line, or enter Insert or Visual mode, and that line shows its raw Markdown. None of this changes the file or adds undo entries.

:markdown-tablesToggle table grids in the current split
:markdown-concealToggle hidden markup in the current split

Set markdown_tables = false or markdown_conceal = false in your configuration to start with source. Hidden markup applies while wrapping is on, and paragraphs wrap on the words you can see, so gj and gk move over visible rows. Code fences, escapes, and link reference definitions are never hidden.

Images

Text
![Token bucket refill over eight seconds](bucket.png)

An image on a line of its own appears in the buffer. Local paths are relative to the Markdown file, and https images are downloaded; either way an image can be up to 8 MB. Height follows the image's proportions, up to markdown_image_max_height rows (16 by default). On the image line, the Markdown appears in the picture's first row and nothing below it moves. Scrolling crops an image instead of squashing it.

Kitty, Ghostty, WezTerm, Konsole, iTerm2, and VS Code's terminal show full-resolution images, as do Sixel terminals such as foot, mlterm, and Windows Terminal. Herdr and Zellij 0.45 or later pass them through to a capable terminal; tmux needs set -g allow-passthrough on. Other truecolor terminals get a smoothed picture drawn with block characters. Set markdown_images to "kitty", "iterm2", "sixel", "halfblocks", or "off" to choose.

gxFollow the link under the cursor
Ctrl-o / Ctrl-iGo back and forward
Ctrl-w xOpen a local link in a split beside the document
gTToggle the task on this line

Web links open in your browser and email links in your mail app. Local files open relative to the Markdown file, #heading and guide.md#heading jump to headings, and src/main.rs:42:3 or src/main.rs#L42 jump to a line. Ctrl-w x reuses the same split for later links from that document, and focus stays in the document unless you set markdown_link_split_focus = "target".

Tables, images, links, and tasks apply to Markdown documents up to 2 MiB.