qtpovrayFind / Search text | December 13, 2017 |
To search for text, bring up the Find
dialog by pressing Ctrl-F
.
Searching for text has three components.
- Find - Looks in the currently displayed editor's file for the text.
- Search in Files - Looks through files in your workspace for the text.
- Replace - Substitute selected text with new text.
There are several options for searching.
- Forward / Reverse - Direction of the search. Note that Search in Files ignores this setting and always searches forward.
- Use RegExp - Use regular expressions in search strings.
- Case Sensitive - Use case matching or not.
- Match whole words - Don't match partial words.
ruck
does not matchtruck
.
The Search in Files results are displayed in the Search Console.
Navigate the results by double-clicking on an entry to open an editor and go to that location.
Find Next / Find Previous
The F3
and Shift-F3
keys move to the next and previous match respectively.
The previous search is used for the source of the Find Next. That is, if you did a 'Find', then Find Next only searches in the current file. If you did a Search in Files, then the next entry in the Search Console will be selected and displayed.
The F3
and Shift-F3
keys are configurable in the
Keys Preference dialog.
Replace
If there is text selected in the editor, and there is text in the Replace with:
textbox,
then the Replace
buttons become available.
- Replace - Substiutes the selected text for the new text.
- Replace/Find - Substitutes the text and performs a Find Next.
- Replace All - Replaces, in the current editor, all occurances of the Find text with the Replace text.