RubyMine 6.3.0 Web Help

Edit | Find | Find in Path, Replace in Path

Project tool window | right-click | Find in Path, Replace in Path

Use these dialogs to find and replace a string in the specified scope. You can perform search taking into account case sensitivity and multiple file masks, and use regular expressions.

Note

Use Ctrl+Shift+FCtrl+Shift+FCtrl+Shift+FCtrl+Shift+FCtrl+Shift+FCtrl+Shift+FCtrl+Shift+FCtrl+HShift+Meta+FShift Command FControl Shift FControl HShift Command F and Ctrl+Shift+RCtrl+Shift+RCtrl+Shift+RCtrl+Shift+RCtrl+Shift+RCtrl+Shift+RCtrl+Shift+HCtrl+Shift+RShift+Alt+Meta+FShift Command RControl Shift RShift Command RShift Command R to toggle between the Find In Path and Replace In Path dialog boxes.

Item Description
Text to find In this field, specify the search pattern. Type the text manually or select one of the previously specified patterns from the drop-down list.

Tip

  • If you specify the search pattern through a regular expression, use the $n format in back references (to refer to a previously found and saved pattern).
  • This field can be left empty. If there is no text to find, but the File mask check box is selected, then search results include only the files matching the specified mask.
Replace with In this field, specify the replacement text. Type the text manually or select one of the previously specified substitutions from the drop-down list.

Note

  • If you specify the replacement text through a regular expression, use the $n format in back references.
  • To use a backslash character \ in a regular expression, escape the meaningful backslash by inserting three extra backslashes in preposition: \\\\.
  • This field is available only in the Replace in Path dialog.
Options In this area, specify additional search parameters. The available options are:
  • Case sensitive - select this check box to have RubyMine distinguish between upper and lowercase letters while searching.
  • Preserve case - if this check box is selected, RubyMine 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.

    Note

    This check box is disabled, if the Case sensitive or Regular expressions check box is selected.

  • Whole words only - select this check box to have RubyMine search for whole words only, that is, for character strings separated with spaces, tabs, punctuation, or special characters.

    Note

    This check box is disabled, if the Regular expressions check box is selected.

  • Regular expressions - select this check box to have RubyMine consider the specified search pattern a regular expression.

    Tip

    Click the [Help] link next to the check box to view reference on regular expressions syntax.

  • 6.0+ Comments only - select this check box to confine search to comments, ignoring the other occurrences.
  • String literals only - select this check box to confine search to string literals, ignoring the other occurrences.
Scope In this area, specify the scope to apply the search to. The available options are:
  • Whole project - select this option to search through the entire project.
  • Directory - select this option to perform search within the specified directory. By default, the text area already contains the directory name where a file currently opened in the editor is located (if you call the dialog from the editor), or where a file selected in the tool window is located (if you call the dialog from the tool window), or the directory name selected in the tool window. Pressing the ellipsis button calls the Select Path dialog, where you can select a directory to make a search.
  • Recursively - this check box is only available for the directory search. If selected, sets the search to be performed in the chosen directory and its subdirectories.
  • Custom - select this option to search in a scope. You can choose one of the scopes from the drop-down list, or click the ellipsis button, and configure the desired one in the Scopes dialog box.
File name filter In this area, specify additional settings to narrow down the search scope.
  • File mask - select this check box to narrow down the search scope through file masks. In the drop-down list, select the desired mask or specify a new one using wildcards. Wildcard can include * to substitute a set of any characters, and ? to substitute a single character. Note that you can specify multiple file masks, delimited with comma (for example, *.xml,*.sql,*.html).

If text to find is not entered, and this check box is selected, then RubyMine find all files matching the specified mask, regardless of their contents.

Open in new tab If selected, sets the search results to be displayed in a separate tab.

Note

The check box is available only in the Find in Path dialog and only if the Find tool window is already opened.

See Also

Procedures:

Reference:

Web Resources: