Previews in depth
Select a file, press Enter, and konoma picks the right renderer from its
rule table (see Configuration). q always
goes back. ? shows the keys for the current preview type.
Markdown
Section titled “Markdown”Rendered with headings, full-width rules, tables (with column alignment and inline styles), task lists, code fences (syntax-highlighted), Mermaid fences (rendered as real diagram images), and inline images (local and remote, drawn as real pixels).
- Links:
Tab/Shift-Tabwalk every link and checkbox in the document;Enteropens the focused link — local paths open inside konoma, URLs open in the browser. - Task checkboxes: focus with
Tab, toggle withSpace. The state character is written back to the file — verified against the file on disk first, so it never clobbers a concurrent edit (e.g. by an AI agent). The states cycle throughui.md_task_states(default[ ]⇄[x]; add a custom in-progress state like[/]if you like). - Mermaid diagrams:
```mermaidfences render inline as real images — laid out and rasterized fully in-process (no browser or Node), dark-themed with a transparent background so they blend into the terminal. A diagram is drawn at its natural size (its own text matching the size of the surrounding body text) and is never enlarged; a small diagram stays small, while a genuinely busy one is wide and uses the pane.ui.mermaid_rowssets an upper limit on the height, not a target — the diagram only shrinks below that (aspect preserved) if its natural size exceeds it or the pane’s width.Tabfocuses a diagram;+/-zoom it in place (h j k lpan,0fits), andEnteropens it full screen (qreturns to the same spot). Standalone.mmdfiles open full screen directly.ui.mermaid = "text"keeps the legacy Unicode rendering; unsupported diagrams fall back to it automatically. - Edge routing:
ui.mermaid_routing(default"splines") picks how a flowchart’s or state diagram’s (stateDiagram-v2) edges are laid out; the default reproduces mermaid’s own layout exactly, so nothing changes unless you set this."konoma-orthogonal"is konoma’s own router: every edge bends only at right angles with sharp corners, decision diamonds become chamfered rectangles so edges land on a flat face, and a straight-through edge across ranks aligns into a single unbent lane — a clean schematic look, for those two diagram kinds only. This mode also switches the diagram to konoma’s own designed palette and style — dark node fill with rounded corners, dashed subgraph frames, neutral edges, andclassDef/stylecolors applied consistently to a node’s border, its edges, and its label — soui.mermaid_themehas no effect here. Set it withui.mermaid_routing = "konoma-orthogonal". - LaTeX math:
$…$and$$…$$(or\(…\)/\[…\]) are typeset in pure Rust and drawn as images — no browser, no Node, no TeX installation. An inline formula is always drawn in the running text, like ordinary Markdown; one too wide for the line shrinks to fit instead of being lifted onto a line of its own. A display formula is centered.$5and anything inside code stays literal. Setui.math = "text"to keep the raw LaTeX instead, andui.math_colorto match your terminal’s foreground. - Block alignment:
ui.md_table_align(default"left") andui.md_image_align(default"center") place a table’s box and a block image — a standalone, a row of badges, a Mermaid diagram — at the left, the center, or the right of the preview. The table setting moves the whole grid, including any picture inside a cell; it does not touch alignment within a cell, which a column’s:---:still decides. - Raw source:
Rtoggles the decorated view against the raw Markdown source, where precise line/column selection works.
Code and text
Section titled “Code and text”Syntax highlighting resolves the grammar by extension, then file name
(.bashrc, Makefile, Dockerfile, …), then first line. Large files stream
through a windowed reader, so multi-hundred-MB logs open instantly.
/searches;n/Njump between matches.- A 2D caret moves with
h j k l;vselects by character,Vby line;ycopies the selection.0/$jump within the line,g/Gto the ends. Ycopies an@path#L12-34reference for the caret or selection.- Files with uncommitted changes get an editor-style git gutter (green added / blue modified / red deleted).
- Wrap is configurable (
ui.wrap); with wrap off, long lines scroll horizontally.
CSV / TSV tables
Section titled “CSV / TSV tables”Comma- and tab-separated files render as an aligned grid with rainbow column colors and a cell cursor:
h j k lmove by cell;g/Gfirst/last row;0/$first/last column.yopens a copy menu: cell, row, column, or full path.Enteropens the cursor cell in a popup — the full, untruncated value, wrapped and scrollable (Enter/q/Esccloses it).- Quoted fields, CJK widths, ragged rows and non-UTF-8 input are all handled; parsing failures fall back to plain text.
Archives
Section titled “Archives”.zip, .tar and .tar.gz open in the same grid: one row per entry with its
name, size and modified date. Nothing is extracted — konoma only reads the
archive’s index — so cell search (/), the cell cursor and the y copy menu
all work exactly as they do for CSV, on a listing that never touches your disk.
Images, SVG, GIF, video, PDF
Section titled “Images, SVG, GIF, video, PDF”Drawn as real pixels in any terminal that speaks a graphics protocol — kitty graphics (Ghostty, kitty, WezTerm, Konsole), iTerm2, or sixel. konoma has its own compressed transfer for the kitty protocol, so those terminals are the fastest; anywhere else the picture degrades to a coarse but visible half-block approximation.
+/-zoom,0/=reset to fit,h j k lpan.- GIFs animate automatically. SVGs rasterize in-process (no external tools).
- Videos show a representative frame. H.264 and HEVC inside
.mp4/.m4v/.movand.mkv/.webmare decoded natively in Rust — nothing to install, which covers an iPhone’s default recording format as well as the container most ripped or re-encoded files arrive in. VP9, AV1, the older codecs (Xvid, MPEG-2, WMV, …), the.avicontainer, and the uncommon profiles (H.264 in 10-bit / 4:2:2 / 4:4:4 / monochrome, HEVC outside Main / Main 10 4:2:0) useffmpegthumbnailer/ffmpegif installed, and show a hint if not. Want playback? Delegate tompvwith one config rule. - PDFs render page by page, natively in Rust (
hayro, no external tool needed) —J/K(or PageDown/PageUp) turn any page. On macOS only, the rare PDFhayrocan’t render (encrypted, corrupt, or otherwise unsupported) falls back to the system’s ownqlmanage/sips— already installed — though those can only produce the first page.
Everything else
Section titled “Everything else”Files matching no rule that look like text open as text; anything else shows a
safe [can not preview] screen. konoma never crashes on unknown input —
add a rule in the config to teach it new formats, including delegation to any
external command.