MPS 2017.2 Help

Finding Text in File

MPS lets you find and replace text strings in an active editor.

Search through the current file

  1. From the main menu, choose Edit | Find | Find, or press N/A. 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 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 right gutter with stripes.

  4. To search for a multi-line fragment, click /help/img/idea/2017.2/multi_line_mode.png in the search box or press N/A.
  5. Explore the search results.

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 N/A.
    • If the search field has the focus, press N/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 N/A(jump to previous selection) or N/A (jump to next selection).
    • Use the /help/img/idea/2017.2/arrowUp.png or /help/img/idea/2017.2/arrowDown.png 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 becomes red:
  • Use the recent search history: with the search pane already open, click /help/img/idea/2017.2/find1.png to show the list of recent entries.
  • To cancel the operation and close the pane, press N/A.
  • Use multiple selection (multiselection). For example, if a certain string has been highlighted as a search result, it is possible to add an occurrence of this string to multiple selection by clicking /help/img/idea/2017.2/add_selection_icon.png (N/A), delete an occurrence from multiple selection using /help/img/idea/2017.2/remove_selection_icon.png (N/A), or add all found occurrences to multiple selection using /help/img/idea/2017.2/select_all_occurrences_icon.png (N/A).

Search options

/help/img/idea/2017.2/find1.pngClick this button to show the history of the recent entries.
/help/img/idea/2017.2/closeBlack.pngClick this button to clear the search field.
/help/img/idea/2017.2/arrowUp.png /help/img/idea/2017.2/arrowDown.pngClick these buttons to navigate through the occurrences of the search string.
/help/img/idea/2017.2/add_selection_icon.pngClick this button to add the next found occurrence to a multiple selection.
/help/img/idea/2017.2/remove_selection_icon.pngClick this button to remove the found occurrence from a multiple selection.
/help/img/idea/2017.2/select_all_occurrences_icon.pngClick this button to create a selection that contains all the found occurrences.
exportToTextFileClick this button to show search results in the Find tool window.
Match CaseIf this check box is selected, MPS will distinguish between upper and lowercase letters while searching.
Regex If this check box is selected, the search string will be perceived as a regular expression, and the replacement preview is shown in a tooltip ( Refer to the section Example).
Wordsif 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.
Last modified: 26 October 2017

See Also