Chapter 62

Find, replace, Go to Line, Open Quickly and the command palette

The find bar#

Open it with Find… (⌘F), the Find button, or Replace… (⌘R). It sits at the top of the document.

ControlWhat it does
Find in document fieldType the text to find. Matches are highlighted as you type.
Aa, ab, .\*Match case, Whole word, Regular expression.
Previous match, Next matchStep through the matches (⇧⌘G, ⌘G).
Show replace / Hide replace (chevron)Shows the Replace with field.
Replace, Replace AllReplaces the current match, or every match. Greyed out until there is a match.
Find In (a switch at the left end of the bar)This Document, or Folder to search the whole open folder instead.
Close find barCloses it.

When there are more matches than Pilcrow counts, the bar says "More matches remain". In Preview, Find looks through the rendered words and highlights them, up to 2,000 matches. A pattern that cannot be used says "Invalid pattern". Replace is available only in Edit: in Preview the bar says "Replace works in Edit. Switch to Edit to change the text." In Side by Side, Find searches the source and highlights the matching words in the preview.

Go to Line#

Go to Line… (⌃G) opens a small sheet with one field, "Line number, or line:column". Type 120 or 120:8 and choose Go, or Cancel. A number past the end goes to the last line. Pilcrow says "Enter a line number, such as 120 or 120:8." for anything else. In a very large file whose lines are still being counted, it asks you to try again in a moment.

Open Quickly#

Open Quickly… (⇧⌘O) is a filename search across the open folder. Type part of a name, and the list narrows and shows "N matches". Choose a result and Open, or Cancel. It is greyed out without an open folder.

The command palette#

Command Palette… (⌃⇧P) lists Pilcrow's commands by name, with their shortcuts, so you can run one without finding its menu. Type to narrow the list, choose a command and Run, or Cancel. It shows "No matching commands" when nothing fits. A command that cannot run right now, such as a source edit while you are in Preview, is shown greyed out. The list includes the formatting and insert commands, the Edit commands for selection, lines and case, speech, the View switches, zoom, and the sidebar panels, and the file and export actions. The shortcut for opening the palette can be changed in Settings ▸ Keyboard.