Files
helder/docs/guide/file-view-markdown.md
T
2026-10-05 11:10:12 +02:00

5.0 KiB

File view: Markdown

Markdown files (.md) open in the file view like any other file, with one extra: a rendered Preview. You switch between the source and the Preview with the Preview button in the bar or with Cmd+M.

Guide index · Related: File view, Diff, Pass on to Agent

At a glance

+--------------------------------------------------------------------+
| (1)[md] docs/setup.md                     (2)[Preview] (3)[Diff]   |
+--------------------------------------------------------------------+
| (4)                                                                |
|  Setup                                                             |
|  -----------------------------------------------                   |
|  Install the app with Herd. Read the [guide] first.  (5) link      |
|                                                                    |
|  -- First item                                                     |
|  -- Second item                                                    |
|                                                                    |
|  +----------------------------------------------+                  |
|  | composer install                             | (6) code block   |
|  +----------------------------------------------+                  |
+--------------------------------------------------------------------+
  1. Bar: the badge md and the path, as for every file.
  2. Preview button: switches between the source and the rendered document. It is lit while the Preview shows.
  3. Diff button: only on a changed file. See Diff.
  4. Rendered document: the Markdown as formatted text, in a readable column of about 68 characters.
  5. Link: click to follow it.
  6. Code block: fenced code in a dark panel, with syntax colours.

Features

The source view

  • A Markdown file opens in its source view: editable text with syntax colours.
  • Headings, list markers, quote markers, rules, code spans and link targets get their own colours.
  • A fenced code block (with three or more backticks or tildes) uses the colours of its language, for example ```php.
  • Word wrap is on for Markdown by default, so long paragraphs fold onto the next row. editor.wordWrap changes this.
  • On a changed file, the source view shows the teal line marks like any file view.

Switch to Preview

  • Click Preview in the bar, or press Cmd+M. Press again to go back to the source.
  • Cmd+M does nothing on a file that is not Markdown.
  • The Preview shows the current text, unsaved edits included.
  • The Preview is read-only. You can select and copy its text.
  • Your undo history and unsaved edits stay intact while you are in the Preview.

What the Preview renders

Markdown Shown as
# to ###### headings Bold headings; a level-3 heading gets a thin rule under it
Paragraphs Body text; lines of one paragraph join into one
**bold**, __bold__ Bold
*italic*, _italic_ Italic
~~text~~ Strikethrough
`code` Inline code
``` fenced blocks Code panel with syntax colours, scrolls sideways
> quotes Amber rule on the left, quote text; quotes may nest
-, *, + lists Items with an amber dash
1. or 1) lists Numbered items
GFM tables A table with a header row; :---: and ---: set centre and right alignment
---, ***, ___ A thin horizontal rule
![alt](path) The image, from the project or from the web; the alt text while it loads or when it fails
[text](url) A link

Not rendered: nested lists, task-list checkboxes, raw HTML, and headings underlined with === or ---. Fenced code in the Preview needs backticks; a ~~~ fence shows as plain text.

  • A web link (http, https) opens in your browser.
  • A mailto: link opens your mail app.
  • A link to a file in the project opens that file in the file view.
  • A link to an anchor (#section) is shown as text but does nothing.
  • Links with other schemes, such as javascript:, are dropped for safety.

Right-click in the Preview

  • Right-click anywhere in the Preview for Pass on reference and Copy reference. The reference points at line 1 of the file. See Pass on to Agent.

Zoom

  • The Preview keeps its own text size. Cmd++ and Cmd+- zoom only the source view.

Keyboard

Keys Action
Cmd+M Switch between source and Preview
Cmd+S Save (from the source view)

Settings

Setting Default Effect
editor.wordWrap markdown markdown wraps only Markdown files; on wraps every file; off wraps none