| |||
| Home > Searching and Replacing Text > Searching and replacing text > Searching for text | |||
To quickly find a text string in the current source file displayed in the File Editor pane:
Enter the required text string into the Find data field above the window.
Press the Enter key to find the first occurrence.
Press Enter again to find the next occurrence.
As you enter a search string, RealView Debugger copies the string to the clipboard. This means that the most-recently used string is available when you next display the Find, or Find and Replace, dialog box.
To find a text string in the current source file using the Find dialog box:
Position the cursor in the current file.
Select Edit → Find... to display the Find dialog box, shown in Figure 12.1.
Enter the required text string into the Find field in the dialog box.
The last search string used might already be displayed if available from the clipboard.
Click the Find button.
When a match is highlighted either:
click the Find button again to search for the next occurrence of the text string
replace the current selection, see Searching and replacing text.
Table 12.1 describes the options available from the Find dialog box.
Table 12.1. Setting temporary search settings
Option | Usage |
|---|---|
Search Backwards | By default, a file is searched forwards, that is from the current cursor position to the end of the file. Set this option if you want to reverse the search direction. This might be useful if you miss a previous match and want to retrace your steps to verify the occurrence or to make a replacement. |
Reg-expression | By default, the File Editor assumes that the string in the Find field is a text string. Set this option to force the editor to interpret the string as a regular expression. |
Stop at Top/Bottom | By default, any search operation cycles through the current file and returns to the starting point. Set this option to force the search to stop when it reaches the top or the bottom of a file. |
Insensitive Searches | By default, any search is case sensitive.
That is uppercase and lowercase are distinct so searching for |
When the first match is found, you can move the focus to the File Editor pane and press F3 to find the next occurrence of the text string. It is not necessary to close the Find dialog box.
See Configuring searches in the workspace for
details on how to configure the Search settings
in your workspace.