Finding and Replacing Text in Project
AppCode extends search and replace capability to the entire project, or any directory with its nested hierarchy. Explore search results in the preview tab or in the Find tool window.
To find a piece of text in all files with the specified path
On the main menu, choose, or press N/A.
- In the Find In Path dialog, specify the following options:
- Start entering the text. Type the text explicitly, or specify a pattern using a regular expression, or select a previously used piece of text or a pattern from the recent entries' drop-down list.
Search scope ( project, directory, or custom scope).
Search options (case sensitivity, whole words, and regular expressions).
Context search options.
Edit the selected result right in the preview editor as it is a functional editor where actions such as Find N/A or Find Next N/A are available without leaving the Find in Path window.
Press Enter to open the selected result in the editor.
Click Open in Find Window N/A to see all of the results in the Find tool window.
To replace a piece of text in all the files within the specified path
On the main menu, select(N/A).
- In the Replace In Path dialog, specify the search and replace strings, the search options, and the scope. Type the search and replacement text explicitly, or specify patterns using regular expression, or select a previously used piece of text or a pattern from the recent history drop-down list.
If you specify the search and/or replacement text through a regular expression, use the
$nformat in back references (to refer to a previously found and saved pattern).
To use a backslash character
\in a regular expression, escape the meaningful backslash by inserting three extra backslashes in preposition:
Click Open in Find Window (N/A) to open a Find tool window with the list of encountered occurrences and a preview of the occurrences alongside.
Toggle between the Find and Replace
To switch from the Find In Path to Replace In Path window, press N/A.
To switch from the Replace In Path to Find In Path window, press N/A.