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, 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.

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
/calloutGFM-style callout (> [!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 floating pill that appears above any text selection. 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.