MPS 2022.3 Help

Find and replace in root nodes

You can quickly find and replace text strings in the current document. Using different options, you can narrow your search process, use regular expressions in your search, and manage your search results.

Search text in the current document

  1. If necessary, specify the search options.

  2. In the search field, start typing the search string:

    Find text

    As you type, the first occurrence of the search string after the current cursor position is selected; the other occurrences are highlighted in the editor. In addition, the matching occurrences are marked in the scrollbar with stripes.

  3. To search for a multi-line fragment, click Enter a new line in the search box or press Ctrl+Shift+Enter

    To return to a single-line mode, press Backspace.

  4. Explore the search results.

To search for symbols declared or used in the current document, start typing a symbol name or its Camel-Cased abbreviation, and then press Ctrl+Space to choose from the matched items.

Explore the 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+F.

    • If the search field has the focus, press Ctrl+A

    In both cases, the existing search string will be selected, and you can start typing a new one.

  • To jump between occurrences, do one of the following:

    • Press Shift+F3 (jump to previous selection) or F3 (jump to next selection).

    • Use the Previous occurrence or Next occurrence buttons in the Search pane.

    • Click the gutter stripes.

  • Next to the search field, you will see the total number of found occurrences and the number of the selected occurrence.

  • You can click Search History or press Alt+Down to show the list of recent search entries.

  • To close the search pane and switch the focus to the editor, press Escape.

  • When you press Escape and return the focus to the editor, the first search match stays selected, so you can copy Ctrl+C or cut Ctrl+X it, or start typing to replace the selection.

    You can also add multiple carets and selection ranges to the occurrences of the search string — click Add Selection for Next Occurrence Alt+J and Unselect Previous Occurrence Alt+Shift+J to select or unselect occurrences one by one, or click Select All Occurrences Ctrl+Alt+Shift+J to select all occurrences.

Search options

Search History Alt+Down

Show the history of the recent entries.

Clear

Clear the search field.

Enter a new line Ctrl+Shift+Enter

Enable entering the search string in several lines. Even without this option, you can search for multiline matches with regular expressions and escape characters.

Match case Alt+C

Distinguish between upper and lowercase letters while searching.

Words Alt+O

Search for whole words only, that is, for character strings separated with spaces, tabs, punctuation, or special characters.

This option is unavailable if Regular expressions is selected.

Previous occurrence   Shift+F3

Next occurrence F3

Navigate through the occurrences of the search string.

Open in Find Tool Window Alt+F7

Show search results in the Find window.

Add to multiple selection Alt+J

Add the next found occurrence to a multiple selection.

Unselect Previous Occurrence Alt+Shift+J

Remove the found occurrence from a multiple selection.

Select All Occurrences Ctrl+Alt+Shift+J

Create a multiple selection that contains all the found occurrences.

In Selection

Confine search and replacement to the current selection in the editor.

Show filter popup Ctrl+Alt+F

Invoke the list of additional options, for example to confine the search to comments or string literals.

Last modified: 08 June 2023