Chapter 6

Find, replace, and navigate

Find in source#

  1. Choose Edit ▸ Find ▸ Find… (⌘F).
  2. Enter a term.
  3. Optionally enable Match Case, Whole Word, or Regular Expression.
  4. Use Return or ⌘G for the next match and ⇧⌘G for the previous match.
  5. Enter replacement text in Edit mode when you want to replace one or all matches.

Regular expressions are powerful but literal search is easier to audit. When using capture groups, test on one result before Replace All.

Find in Preview#

In Preview, Find searches the rendered words rather than the source markup. All matches are highlighted and the active match is distinct. Preview cannot replace because it is not editable. Matches split by formatting, or text inside code, diagrams, and equations, may not appear. Switch to Edit to search the literal source.

In Side by Side, Find searches the source and highlights corresponding rendered matches.

Go to line and column#

Choose Edit ▸ Go to Line… (⌃G). Enter 120 for line 120 or 120:8 for line 120, column 8. Values beyond the document clamp to the last valid place. File lines, not visually wrapped lines, determine the count.

Go back and forward#

When you open search results, links, or distant locations, use Go Back and Go Forward to retrace navigation. This is separate from Undo: navigation history changes where you look, not document content.