- On the main menu, choose Ctrl+FCommand F or Alt+F3Alt F3. The search pane appears on top of the active editor. , or press
- If necessary, specify the search options.
- In the search field, start typing the search string:
As you type, the matching occurrences are highlighted in the editor, and marked in the right gutter with stripes.
- Explore search results.
- On the main menu, choose Ctrl+RCommand R. The search and replace pane appears on top of the active editor. , or press
- If necessary, specify the search and replace options.
- In the search field, start typing the search string. As you type, the matching occurrences are highlighted in the editor, and a replace dialog box pops up automatically at the first occurrence, suggesting you to replace the current occurrence, or all of them, with an empty string.
- Start typing the replacement string. It is immediately reflected in the replace dialog box.
Note that for the regular expressions replacement preview is shown at the tooltip.
- Explore search results, and, using the buttons of the replace dialog box, replace occurrences as required.
- To initiate a new search, do one of the following (depending on the current focus):
- If the editor has the focus, press Ctrl+FCommand F or Alt+F3Alt F3.
- If the search field has the focus, press Ctrl+ACommand A
In both cases, the existing search string will be selected, and can start typing a new one.
- To jump between occurrences, do one if the following:
- Press Shift+F3Shift F3 or Ctrl+Shift+LCommand Shift L or F3F3 or Ctrl+LCommand L.
- Use or buttons in the Search pane.
- Click the gutter stripes.
- The search pane shows the number of found occurrences. If no matches are found, the search pane is red highlighted:
- Use Code completion in Find and Replace panes. Start typing the search string, press Ctrl+SpaceCommand Space, and select the appropriate word from the suggestion list.
- Use the recent history of searches: with the search pane already open, click to show the list of recent entries.
- With the search or replace pane already opened, use Ctrl+RCommand R or Ctrl+FCommand F or Alt+F3Alt F3 to toggle between panes. So doing, the search and replace strings are preserved.
- To cancel operation and close the pane, press EscapeEscape.
Search and replace options
|Click this button to show the history of the recent entries.||Search, replace|
|Click these buttons to navigate through the occurrences of the search string.||Search, replace|
|Click this button to show search results in the Find tool window.||Search, replace|
|Case sensitive||if this check box is selected, MPS will distinguish between upper and lowercase letters while searching.||Search, replace|
|Match whole words only||if this check box is selected, MPS will search for whole words only,
that is, for character strings separated with spaces, tabs, punctuation, or special characters.
This check box is disabled, if the Regular expressions check box is selected.
|Regex||If this check box is selected, the search string will be perceived as a regular expression.
If this check box is selected, MPS shows replacement preview in a tooltip, as shown in the image above.
|Preserve case||If this check box is selected, MPS retains the case of the first letter
and the case of the initial string in general. For example,
MyTest will be replaced with Yourtest if you specify yourtest as the replacement.
This check box is disabled, if Regular expressions check box is selected.
|Selection only||If this check box is selected, search and replacement will be confined to to the selected text only.||Replace|
|Exclude/Include||Click Exclude button to skip the current occurrence and exclude it from the Replace all operation. The button for this occurrence changes to Include.||Replace|
|Replace||Click this button to replace the current occurrence and proceed to the next one.||Replace|
|Replace all||Click this button the replace all found occurrences in the current file, or in the selection.||Replace|