Find and Replace

Nova can perform find and replace operations in the current editor document or across multiple files at once. To learn more about multi-file find and replace, please refer to the Find Sidebar article.

The Find Banner

To open the find banner, choose Edit > Find > Find… (⌘F). The find banner contains the following items:

find banner
Find And Replace Fields
Type the text you wish to find in the Find field. If you also want to replace the found text with alternate text, type the desired replacement text into the Replace field.
Match Text Case
When enabled, find will present only matches that also match in case. In other words, “cat” will not match “CAT”.
Search Only In Selection
When enabled, the find will be performed only in the current text selection. Normally, the entire document is searched. (Available within the Find Banner only.)
Match Only Whole Words
When enabled, find will only match the find term in its entirety and ignore partial matches. For example, “cat” will not match “catalog”.
Use Regular Expressions
When enabled, your find term will be evaluated as a regular expression rather than literal text. Regular expressions are a powerful pattern matching language. Nova uses the PCRE2 Regular Expression engine. A full explanation is beyond the scope of this document. Consult your favorite internet search engine for more information on regular expressions.
Done
Closes the find banner. You can also close it by pressing the Esc key while the find banner has keyboard focus.
Previous / Next buttons
Finds the previous or next occurrence of the find term. Matching text, if any, will be selected in the editor. You can also use the keyboard shortcuts ⌘G to find the next match and ↑⌘G to find the previous.
Replace
Replaces the currently selected match with the text from the Replace field.
Replace All
Replaces every match in the current document with the text from the Replace field. Afterward, a number will appear in the Replace field indicating how many occurrences were replaced.

You will also notice a blue star icon in both the Find and Replace fields. Clicking this icon will show recent searches you have performed so you can quickly reuse them. Additionally, you’ll see a number of placeholder tokens that can be inserted into the Find or Replace fields.

Using Placeholders in Find and Replace

Placeholders can be used to perform find and replace operations that follow a consistent pattern. Placeholders are inserted by choosing them from the pop-up menu that appears when you click the blue star icon located in the Find and Replace fields.

The following placeholders are accessible via the Find field:

find placeholders
Any
Matches any character
Word
Matches any word character
#
Matches any numerical digit
_
Matches any whitespace
Matches any tab stop
Break
Matches any word break
Matches any line break

The Replace field supports both the Tab and Line Break placeholders.

This article was last updated on May 16, 2022