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, 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.
| Command | Inserts |
|---|---|
/h1 … /h6 | Heading at that level |
/code | Fenced code block |
/quote | Blockquote |
/hr | Horizontal rule |
/table | Three-column Markdown table |
/callout | GFM-style callout (> [!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 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.