Power Editing
The everyday depth of an editor you live in: comments, brackets, snippets, completion from the document, clipboard history, and rules that set a file up the way you want it when it opens.
Comments
⌘/ toggles line comments across the selection as one undo step. It is language aware: markers land in a straight column at the shallowest indent, blank lines stay untouched, and uncomment wins only when every non-blank selected line is already commented. ⌥⌘/ wraps or unwraps a block comment. Languages without a line marker, HTML and XML, route ⌘/ to the block pair.
Brackets
Typing (, [, {, or a quote closes the pair with the caret between. Typing the closer walks over the inserted one, and backspace on a fresh pair removes both. Hand-typed closers are never swallowed, quotes stay single against a word character, and a selection wraps instead of being replaced.
The matching bracket at the caret gets a ring highlight. Edit ▸ Brackets carries Jump to Matching (⌃⌘B), Select Surrounding Pair (⌃⇧⌘B), Delete and Change Surrounding Pair, and the Auto-Close toggle.
Snippets with tab stops
Author snippets in Edit ▸ Snippets…: a name, the abbreviation that triggers it, an optional language list, and a body.
$1to$9are tab stops,${1:default}is a placeholder with a default, and$0is the final caret.- A repeated stop is a mirror: it types in every place at once.
$DATE,$TIME,$FILENAME, and$CLIPBOARDare variables;\$is a literal dollar.
Type the abbreviation and press ⇥. The snippet expands as one undo step with the first placeholder selected, ⇥ walks the remaining stops while they track your typing, and ⎋ ends the session. Malformed syntax passes through literally; a snippet never eats text.
Completion from the document
⌥⎋, or Edit ▸ Complete Word, lists identifiers from the file itself in a panel at the caret, most frequent first, matching what you have typed. There is no dictionary and no guessing. The scan is a bounded window around the caret, so it behaves the same in a small config and in a multi-gigabyte log.
Clipboard history
⇧⌘V shows everything you cut or copied in Caxton, searchable. Return pastes the entry and makes it the live clipboard. With several cursors, ⌥Return spreads a matching multi-line entry one line per cursor.
- Editor-local by design. It never reads the system pasteboard, so other apps' clipboards are invisible to it.
- Secrets are excluded. Copies from files that look like secrets (
.env, key material, credentials) are never recorded, and entries over 1 MB are not kept. - Unpinned entries live in memory and end with the app. ⌘P pins an entry so it survives relaunch, up to 20 pins.
Per-file rules by glob
Edit ▸ File Pattern Rules… holds an ordered list of glob rules that apply at open, including session restore, workspaces, and Reopen Closed Tab. A plain pattern (*.log) matches file names; one with a slash (*/exports/*.csv) matches the whole path.
Each rule can set word wrap, tab width, encoding, or syntax and leave the rest inherited. Rules read top to bottom and the first match wins for each setting. The encoding rule applies exactly like Reopen with Encoding, automatically, so the vendor who ships Shift-JIS every week just opens right.
The keyboard you expect
- With a selection, Tab indents the selected lines and ⇧Tab outdents them, one undo step each.
- ⌘D selects the word under the caret; each further press adds a cursor at the next occurrence.
- ⌥⇧ with the arrow keys starts or grows a rectangular selection from the keyboard.
Multi-cursor editing, rectangular selection, the Text toolbox, undo, and saving are covered in Editing at Scale.