GUIDE 9 OF 42 · EDITOR

Find and replace in a file

Search the file you are editing, step through the matches and replace them.

  1. With the file open, press ⌘ F, or tap the floating ⌘ button over the editor and choose Search.
  2. Type what you are looking for and press Return, or tap the magnifier.
  3. The count shows which match you are on and how many there are, for example 2 / 7.
  4. Use the up and down arrows to go to the previous or next match. On a keyboard, ⌘ G and ⇧ ⌘ G do the same.
  5. Narrow the search with Aa (match case), |ab| (whole word) or .* (regular expression).
  6. To replace, tap Replace, type the new text, then tap Replace for the current match or Replace All.
Find and replace in the open file, on match 4 of 6

All guides