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.
Type
| Setting | Range | Default |
|---|---|---|
| Font size | 13–20 px | 15 px |
| Line height | 1.30–2.00 | 1.625 |
| Tab size | 2–8 spaces | 2 |
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.
| Type | Label | Aliases |
|---|---|---|
note | Note | — |
tip | Tip | success, hint |
important | Important | — |
warning | Warning | caution |
danger | Danger | error |
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.
| Command | Inserts |
|---|---|
/h1 … /h6 | Heading at that level |
/code | Fenced code block |
/quote | Blockquote |
/hr | Horizontal rule |
/table | Three-column Markdown table |
/callout | Callout block (> [!note]) |
/bold, /italic, /strike, /code-inline | Inline formatting around the selection |
/link | Link template [text](url) |
/bullet, /number, /task | List 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.