Editing with Live Preview

Open a Markdown file and you're in Live Preview by default: the line with the cursor shows the Markdown source, and the rest is formatted. Tables, math and Mermaid diagrams are drawn right in the text; hover over one and click </> at its top right to edit its source. The file saves automatically when you pause, switch away or close it, and you can press ⌘S at any time.

  • Move the cursor to a line and its #, ** and []() marks appear; they tuck away again when you leave.
  • Tables, math blocks, Mermaid diagrams, images and inline HTML always stay drawn, even when the cursor passes through. To see the source, hover over the block and click </> at its top right; the source shows together with the drawing. Click the eye icon or press Esc to put it away. Tables can also be edited right in their cells. Inline math works like other text: move the cursor into it to see its source.
  • A single click follows a link, no ⌘ needed. To edit a link's text, move the cursor into it with the arrow keys. See Links and backlinks.
  • Click a task list's box to check it; ⌘Z undoes that.

All of these are in the View menu, and in the toolbar's More menu:

  • Source Mode (⌥⌘S): the whole document as Markdown source, unformatted.
  • Read-Only Mode (⌘R): read without editing, and without showing the source.
  • Full Width (⇧⌘F): the text fills the window's width, with no limit on line width.
  • Soft Wrap Lines (⌥Z): in code files, long lines wrap at the window's edge; the file's content doesn't change.
  • Text size: Increase Text Size ⌘=, Decrease Text Size ⌘-, Actual Text Size ⌘0, in fixed steps.

With shortcuts:

Format Keys Format Keys
Bold ⌘B Heading 1–3 ⌥⌘1 – ⌥⌘3
Italic ⌘I Checkbox ⌥⌘4
Underline ⌘U Bulleted List ⌥⌘5
Inline Code ⌘E Numbered List ⌥⌘6
Strikethrough ⇧⌘X Blockquote ⌥⌘7
Highlight ⇧⌘H Code Block ⌥⌘8
Link ⌘K Divider ⌥⌘9

With no text selected, the format applies to the word at the cursor. Press the same heading level again to turn it back into body text (⌥⌘0 is Body too). In a list, ↩ continues with the next item, and Tab / ⇧Tab change the indent.

  • Lines: ⌘L selects a line, ⌥↑ / ⌥↓ move it up or down, ⇧⌥↑ / ⇧⌥↓ copy it up or down, ⇧⌘K deletes it, and ⌘↩ inserts a line below.
  • Multiple cursors: ⌥⌘↑ / ⌥⌘↓ add a cursor on the line above or below.
  • Find: ⌘F finds, ⌥⌘F finds and replaces, ⌘G finds the next match. This works in PDFs and Web Preview too.
  • Paste: right-click for Paste as Plain Text and Paste as Markdown Table.
  • Images: paste, drag in, or choose Edit > Insert Image…. Choose which folder images go to in Settings > Editor, such as the Workspace's attachments/ folder.
  • Discard unsaved changes: File > Revert to Saved.

Every shortcut can be changed in Settings > Keyboard Shortcuts.