Alpha Q&A #003
How to do incremental searching in Alpha ?


Question

How to do incremental searching in Alpha ?

Answer

Incremental searching is implemented in Alpha in two ways: This document explains how to perform incremental searches in the Find Bar which is a new feature introduced in Alpha and is a more interactive interface for literal searches than the Find dialog. For the Status Bar approach, see the Incremental Search help file.

Displaying the Find Bar

Every Alpha document window has a Find Bar which is hidden by default. To bring it up, select the command Search ↣ Show Find Bar or press the key combination ⇧⌘F.
The Find Bar should appear at the top of the text pane. When the window is split into several subpanes, each subpane has its own Find Bar.

Enabling incremental searching

By default, incremental searching is disabled. This can be changed at two different levels:

Executing a search

When incremental searching is enabled as explained in the previous section, there is nothing special to do. Just type your search string in the search field of the find bar. As you type or delete characters in the search field, the matches are adapted accordingly.
If matches are found, there are outlined in the text panel. To make it easier to see the matches, the text pane is dimmed, except for the locations of the incremental matches. Use the buttons with a left pointing and a right pointing triangle to navigate between matches. Incremental searching window
Clicking in the text pane takes you out of the search field and returns to normal editing state.
If you want to make replacements, click on the Replace checkbox found near the right edge of the Find Bar. A second field is then displayed to enter the replacement string. To perform replacements, click on the Replace or All button.

Hiding the Find Bar

If you open the Search menu with the option key () pressed, the Show Find Bar menu item is changed to Hide Find Bar. Alternatively, you can press the key combination ⌥⇧⌘F or click on the Done button in the Find Bar.

Note for developers

It is possible to interact with the Find Bar from a script. See the documentation of the [findBar] and [pasteboard] commands.
To enable or disable this functionality, see the key incrementalSearching in the [getWinInfo] and [setWinInfo] commands.

Related Links