Each editor tab in Nova has a find banner for searching within its content, but when you need to perform a search (or search-and-replace) operation across many files, it’s easier to use the Find Sidebar.

Find Sidebar

The Find Sidebar contains the following items:

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.

Options Menu

From this menu, you can choose from different options regarding how your search will be performed. These options include:

  • Contains: Your search will return any instance of the Find term found in any context.

  • Matches Word: Your search will only match the Find term in its entirety and ignore partial matches. For example, “cat” will not match “catalog”.

  • Begins With: Your search will only return results where your Find term is found at the start of a word or line.

  • Ends With: Your search will only return results where your Find term is found at the end of a word or line.

  • Regular Expression: Your search will be evaluated as a regular expression rather than literal text. Regular expressions are a powerful pattern matching language. A full explanation is beyond the scope of this document. Consult your favorite internet search engine for more information on regular expressions.

Match Text Case

Choose whether the search should Ignore Case or Match Case (in other words, choose whether searching “cat” should also find “Cat” or not).

Find

Searches all files in the current workspace for the text entered into the Find field.

Replace All

Replaces every found match with the text from the Replace field. Afterward, a number will appear in the Replace field indicating how many occurrences were replaced.

Setting Search Scope

At the top of the Find Sidebar, you’ll see three options for setting the scope of your search.

Scope options in the Find Sidebar
  • Project searches your entire project directory.
  • Open Files searches only within files you currently have open in Nova.
  • Folders searches only within the folders you specify. This defaults to your project folder, with a dropdown menu allowing you to specify which particular folders you want to search within.

There is an additional button in the bottom left corner for specifying Search Filters. Search Filters are a powerful, flexible system for narrowing the scope of your searches.

Search Filters sheet

From the Search Filters view, you can create multiple filters with combinations of rulesets regarding what files Nova should perform your search within. You can set up filters based on file name, absolute file path, relative file path, file extension, Document status, and Source Control status. You can combine these in countless ways - need to search only within .js files, that are not open in Nova, and that have uncommitted changes in Git? You can! You can also save these filters for later use, and toggle individual filters on and off.

Using Placeholders

Access the Placeholders pop-up by clicking on the blue star icon to the left of the Find or Replace fields.

Placeholders menu

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. Placeholders can be used to perform find and replace operations when the desired text varies, but follows a consistent pattern.

The following placeholders are accessible via the Find field:

Any
Matches any Characters
Word
Matches any Word Characters
#
Matches any Digits
_
Matches any Whitespace
Matches any Tabstop
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 June 4, 2021