Scratch

Editor preferences

The editor in Scratch is CodeMirror 6 with a Markdown grammar and live preview. The handful of preferences that matter live in Settings → Editor.

image pending
Settings — Editor, with sliders for font size, line height, and tab size, plus toggles for show line numbers and spell check.

Type

SettingRangeDefault
Font size13–20 px15 px
Line height1.30–2.001.625
Tab size2–8 spaces2

The editor uses your system monospace font for code spans and code blocks; the rest of the buffer uses Inter at the size and line height set above.

Toggles

  • Show line numbers — show a number next to each line. Off by default. Useful when you’re using Scratch for code snippets.
  • Spell check — underline misspelled words as you type. On by default. Uses macOS’s built-in spell checker.

Live preview

Markdown is rendered inline as you type:

  • Headings (# through ######), bold, italic, strikethrough, and inline code change to their formatted appearance.
  • Code blocks are syntax-highlighted (the language identifier on the fence chooses the grammar).
  • Links and images render. The raw Markdown source is restored on the line you’re editing so you can always see what’s there.
  • Task list items (- [ ] and - [x]) become real checkboxes you can click.
  • Blockquotes get a quiet left bar that runs the full height of the quote. Nested quotes show one bar per level.
  • Callouts render with a colored left bar and a label. See Callouts below.

Only #-style headings are recognized. Underline-style (setext) headings — a line of text followed by === or --- — are not treated as headings, so starting a list right under a line of text never flashes that line as a heading.

Callouts

A callout is a blockquote with a type marker on the first line — > [!note]. When your cursor is outside the block, Scratch hides the marker, draws a left bar in the type’s color, and shows the type name as a quiet label. Put your cursor inside to edit the raw Markdown back into view, the same as any other block.

Write a custom label after the marker: > [!note] Read this first.

TypeLabelAliases
noteNote
tipTipsuccess, hint
importantImportant
warningWarningcaution
dangerDangererror

important follows your accent color. danger is always red, regardless of accent. Any unrecognized type renders as a note, with the name you typed as its label.

Insert one with /callout, or type > [!note] by hand.

Slash commands

Type / at the start of a line to open a menu of inserts. Pick one with the arrow keys and Enter, or keep typing to filter.

CommandInserts
/h1/h6Heading at that level
/codeFenced code block
/quoteBlockquote
/hrHorizontal rule
/tableThree-column Markdown table
/calloutCallout block (> [!note])
/bold, /italic, /strike, /code-inlineInline formatting around the selection
/linkLink template [text](url)
/bullet, /number, /taskList items

Slash commands are convenience — every one of them maps to standard Markdown syntax you can also type by hand.

Rephrase is separate. When Apple Intelligence is on, it lives in a footer button and the ⌘K menu. See rephrase with Apple Intelligence.

Inline calculations

Lines that look like math get a live result at the end of the line — 2 + 2, 5 ft to m, tax = 0.0875 and the like. See inline calculations for the full reference, including variables, units, currency conversion, and how to commit a result into the buffer.