Scratch

The buffer

Scratch is a single window — the buffer. You summon it with a global hotkey, type into it, and dismiss it. Whatever was on screen is still on screen when you come back.

image pending
A buffer with headings, a list, an inline code block, and a blockquote, all rendered live.

One window, many buffers

The buffer shows one buffer at a time. The first line of the buffer doubles as its title and is shown in the header. Move between buffers with ⌘⇧] (next) and ⌘⇧[ (previous), or with a two-finger trackpad swipe.

The footer shows your position in the set, like 3 of 12.

Autosave

Every keystroke is queued and written to disk on a 500 ms debounce. Scratch also flushes when the window loses focus, when you switch buffers, and when the app quits. You can force a save with ⌘S, but you almost never need to.

If a save fails — disk full, permissions revoked — Scratch surfaces the error in a persistent toast at the bottom of the window. The text in the buffer remains intact.

Where buffers live

Buffers are individual Markdown files inside macOS application support:

~/Library/Application Support/Scratch/buffers/
  9c0c1c2e-….md
  b14d2d83-….md

Each buffer is one .md file named with a UUID. You can open this folder directly: File → Reveal buffers folder, or Settings → General → Buffers → Reveal in Finder.

A few things worth knowing:

  • The file content is plain Markdown. You can read or edit it with any tool.
  • The maximum size of a single buffer is 5 MB. Scratch will refuse to load buffers larger than this — split them into multiple buffers.
  • Your current buffer and ordering are tracked in a small state.json kept in Scratch’s app data — it stays on this Mac and does not move with the buffer folder. Don’t edit it by hand.
  • Settings live in settings.json in Scratch’s app data, not in the buffer folder.

Backups and sync

Scratch does not run a sync service, but it can keep your buffers in a folder that something else syncs. In Settings → General → Buffers, use Buffer location → Choose folder… to point Scratch at a folder inside iCloud Drive, Dropbox, Syncthing, or a Git repo. When you choose a new folder Scratch asks whether to bring your existing buffers over; it copies them and leaves the originals in place. Use default returns to the built-in location.

Only the .md buffer files move. The current-buffer pointer and ordering (state.json) stay on this Mac, so each machine keeps its own place in the set.

Changes made elsewhere show up live. If a sync client or another machine creates, edits, or deletes a buffer, Scratch reflects it without reopening the buffer. If the buffer you’re looking at changes on disk while you have unsaved edits, Scratch shows a non-destructive banner — Keep mine or Use the other version — and never discards either silently.

image pending
The buffer-changed banner with Keep mine and Use the other version.

If the chosen folder is unreachable at launch (an ejected drive, say), Scratch falls back to the default location for that session and keeps your setting for next time.