Menu: Search > Find
Default Shortcut Key: Ctrl+F
Macro function: Find()
The Find command is used to specify and initiate a search for a text string. Many different options are available to make searching more flexible and more powerful. Wildcard characters (also known as Regular Expressions) can also be used within the search string.
If the search string is found the text cursor will be moved to the matching string and the text will be selected, if the Select matched text option is active. The matched text can then be operated upon as can any other selected text.
If the search string is not found a dialog box will appear to report this fact. If you prefer that this report appear on the message line instead, use the option provided on the Configure | Preferences | Messages options page. The option is titled Report failed searches in a popup message box.
The controls and options in the Find dialog box are described below:
This is the edit box where the search string is entered. When the Find command is issued, the word beneath the text cursor is placed into the Find edit box, in case that word--or a word which is nearly the same--is to be the search string. The Find Fast command can also be used to search for the word at the text cursor without raising the Find Text dialog. To recall a search string which was previously entered, use the drop-down list or press the up or down arrow keys to review the items in the history list. Regular Expressions may be used within the search string.
Use this button to insert a tab character into the Find edit box.
Ordinarily, the Tab key is used to move from field to field within a dialog box. If you would prefer that the Tab key insert a tab character in this dialog box, and in other Find/Replace related dialog boxes, check the relevant box on the Configure | Preferences | Tabs dialog page.
If this box is checked the history list will be maintained in alphabetic order, rather than in the order the strings were entered.
This option causes the search to be performed downward, toward the end of file.
This option causes the search to be performed upward, toward the start of file.
Perl regular expressions
If this box is checked, wildcard characters within the search string will be interpreted according to the Perl-Compatible Regular Expression (PCRE) convention. In part, this means that the asterisk (*) will cause a match of zero or more occurrences of the preceding character. The period (.) will match any single character. For more information, see Regular Expressions.
When using pattern matching characters, there can sometimes be more than one text string that matches the search string. This option can be used to request that the longest possible matching string be returned.
This option can be used to force the search string to be matched exactly. When unchecked, a case insensitive search is performed.
Match whole words
This option can be used to restrict matches to those strings which appear as a whole word. The characters which serve to delimit words are user-configurable; see Configure | Preferences | Cursor Travel.
Match at start of Line
This option can be used to force the search string to be matched only when a matching string appears at the start of a line. This effect can also be achieved with a Regular Expression.
Match at end of Line
This option can be used to force the search string to be matched only when a matching string appears at the end of a line. This effect can also be achieved with a Regular Expression.
Match syntax element
This option can be used to force a matching string to belong to a specified syntax group. Example: you could type the search string 'while' and require that it be matched only when it appears as a Reserved Word. Instances that occur within program comments or quoted strings (or any other syntax) would not be matched. (This is a powerful capability with lots of potential, and one we've never seen in another editor.)
This option can be used to restrict the search to the extent of the selected text.
Cursor to bottom / Cursor to top
This option causes the search to be performed from the cursor onward, according to the current direction. The search ends when either the top or bottom of the file is reached.
This option causes the search to be performed from the cursor onward, according to the current direction. When either the top or bottom of file is reached, the search wraps around, and continues to the original cursor position.
Top to bottom / Bottom to top
This option causes the search to be performed from the top or bottom of file onward, according to the current direction.
All open files
This option causes the search to be performed across all open files.
Use this option to limit the scope of the Find operation to those files within the active project.
This option causes the search process to begin as soon as a character is pressed, rather than waiting for OK to be pressed. When typing long search strings, you may find that the match is found before you're done, thereby saving typing. Just press Enter to dismiss the dialog and remain at the displayed match.
Select matched text
This option causes the matched string to be selected so that it can be operated upon by any command that operates upon selected text. When this option is not used, the text cursor is simply placed at the start of the matching string.
Highlight all matches
This option causes all instances of the matched string to be highlighted within the current file, and within other edited files. The highlighting will persist until a new Find operation is performed, or until the end of the editing session. Alternatively, highlighting can be disabled altogether using the View | Text Highlighting command (this also affects the general Text Highlighting feature). The foreground and background colors used to highlight matches can be set on the Configure | Colors dialog.
This option can be used to extend an existing selection to the point of the matched string.
This option controls the screen position at which matched strings are displayed. When a new match is already on-screen, it will be shown in place, without redrawing the screen. If the screen must be redrawn to show a new match, then the matching line will be positioned at the designated screen location.