MPS Web Help

The standard facility helps you find and replace text strings in the active editor.

In this section:

To find a text string in the current file
  1. On the main menu, choose Search | Find, or press Ctrl+FCommand F or Alt+F3Alt F3. The search pane appears on top of the active editor.
  2. If necessary, specify the search options.
  3. 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.

  4. Explore search results.
To replace a text string in the current file
  1. On the main menu, choose Search | Replace, or press Ctrl+RCommand R. The search and replace pane appears on top of the active editor.
  2. If necessary, specify the search and replace options.
  3. 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.
  4. 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.

  5. Explore search results, and, using the buttons of the replace dialog box, replace occurrences as required.
Working with search results
  • 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

Item Description Search/Replace
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.
Search, replace
Regex If this check box is selected, the search string will be perceived as a regular expression.
Note

If this check box is selected, MPS shows replacement preview in a tooltip, as shown in the image above.

Search, replace
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.
Replace
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

See Also

Reference:

Getting Started:

Web Resources: