AppCode 2018.1 Help

Find and Replace in Path

Edit | Find | Find in Path or Replace in Path
N/A or N/A
In the Project tool window and Navigation Bar: Find in Path or Replace in Path from the context menu for a directory.


Specify what you want to find and where. In the Replace in Path window, also specify the replacement text or pattern.

Use N/A and N/A to switch between the find and replace modes.

Search pattern and replacement text options

Item

Description

Match case

Select this check box to have AppCode distinguish between upper and lowercase letters while searching.

Preserve case

If you select this check box AppCode 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 the Case sensitive or Regular expressions check box is selected.

This field is available only in the Replace in Path dialog.

Words

Select this check box to have AppCode search for whole words or their parts, (character strings separated with spaces, tabs, punctuation, or special characters).

This check box is disabled, if the Regex check box is selected.

Regex

Select this check box if the specified search pattern should be treated as a regular expression.

filter arrow downUse this drop-down list to confine the search to a certain context, for example:
  • anywhere - select this option to search everywhere.

  • in comments - select this option to confine search to comments, ignoring the other occurrences.

  • In string literals - select this option to confine search to string literals, ignoring the other occurrences

  • Except... - select one of the exception options to perform search avoiding comments, string literals or both.

File mask

Select this checkbox 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.
  • Wildcards can include:

    • * to substitute a set of any characters,

    • ? to substitute a single character,

    • ! to exclude files. Mind that ! should go first in a particular file name pattern, for example, !*.gant

    You can specify multiple file masks, delimited with commas (for example, *.xml,a?c.sql,!*.html).

    Note also, that negated pattern (for example, !*.min.js) has implicit inclusion pattern *. This allows avoiding such constructs as *, !*.min.js for every file except minified javascript).

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

Search field

In this field, specify the search pattern. Type the text manually or select one of the previously specified patterns from the drop-down list.
  • 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 checkbox is selected, then search results include only the files matching the specified mask.

Click search everywhere icon to see the list of recent search entries.

Replace field

In this field, specify the replacement text. Type the text manually or click search everywhere icon to select one of the previously specified replace entries from the drop-down list.
  • 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 backslashes by inserting three extra backslashes before them: \\\\.

This field is available only in the Replace in Path dialog.

In Project

Select this option to search through the entire project.

Module

Select this option to search through a module within the project. AppCode displays a field with the name of the current module. If you have more than one module you can switch to another module using the drop-down list.

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 opens the Select Path dialog, where you can select the necessary directory.

search recursively

This icon is only available for the directory search. Select it to set the search to be performed in the chosen directory and its subdirectories.

Scope

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 define a new scope in the Scopes dialog.

Preview area

Use this area to check the preview of your search target.

You can press N/A or N/A keys to navigate between entries in the preview area without leaving the search field. You can press N/A to get to the selected entry in the editor. You can also edit your entry right in the preview area. AppCode opens an editor for each search result so you can edit the result without leaving the Find in Path or Replace in Path window. Press N/A to skip to the next matched entry in the preview editor. You can also press N/A to search through the current file or N/A to replace text in the current file.

Item

Description

iconAction blueClick the down arrow to reveal the result presentation options.
  • Skip results tab with one usage - Select this checkbox to be navigated directly to the found string in the editor, when only one usage is found.

    The checkbox is available only in the Find in Path dialog box.

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

Open in Find Window

  • When you click this button in the Find in Path dialog box, AppCode displays the encountered occurrences of the search string in the Find tool window.

  • When you click this button in the Replace in Path dialog box, the Find tool window with the list of encountered occurrences opens with a preview of the occurrences alongside. For more information on how to replace a text, refer to the Find and replace section.

Last modified: 19 September 2019