Chapter 7

Use multiple carets and column editing

Edit repeated occurrences#

  1. Select a word.
  2. Choose Select Next Occurrence repeatedly to add matching selections.
  3. Type once. Every selected occurrence changes in the same transaction.
  4. Undo once if needed.

Use Select All Occurrences only after confirming the term is specific enough. A short word may match places you did not intend.

Add carets vertically#

Place the caret in a line, then choose Add Caret Above or Add Caret Below. Continue until each target row has a caret. Typing, deletion, and supported formatting apply to all carets.

Place carets in a column#

Choose Carets in a Column…, specify the line range and column, preview the placement, and confirm. This is ideal for adding a prefix to a rectangular run of lines. Short lines clamp safely rather than being padded invisibly.

Column selection is displayed with a badge. Exit multi-caret editing with Escape or by clicking a single location. Before running a destructive command, scan the document for every caret.

With several carets, Pilcrow deliberately turns off smart pairs, list continuation, and curly-quote substitution: one keystroke inserts one literal character at every caret. On iPad, use a hardware keyboard or More ▸ Carets in a Column…. For a touch column drag, enable More ▸ Column Selection and drag one finger; two fingers still scroll. With a trackpad or mouse, hold Option while dragging. A drag can cover only lines currently loaded in the editor.