The Find and Replace window allows you to search for and replace text
in the current document or in a range of specified files.
To activate the Find and Replace window:
- Choose Search > Replace in Files or press Ctrl+Alt+F.
To find text in a single file:
- Select Current Document in the context combo box.
- Enter the string to be found in the text edit input.
- If the search will be case sensitive, set the Match case option.
- If the search will be for a whole word—i.e., there will be whitespace, such as spaces
or the beginning or end of the line, on both sides of the string being searched
for—set the Whole word option.
- If the search string is a regular expression, set the
Use regexp option.
- Click the Find button to find all occurrences of the string in the current
document.
To find and replace text in a single file:
- Click the Replace button on the toolbar.
- Enter the string to search for into the Find what input.
- Enter the replacement string into the Replace with
input. If the search string is a regular expression, the
n back-reference can be used in the replacement string to reference
captured text.
- If the search will be case sensitive, set the Match case option.
- If the search will be for a whole word—i.e., there will be whitespace, such as spaces
or the beginning or end of the line, on both sides of the string being searched
for—set the Match whole word option.
- If the search string is a regular expression, set the
Use regular expression option.
- Click the Find Next button to find next occurrence of the string, then click the Replace
button to replace the found string with the replacement string; or click
Replace All to replace all occurrences of the search string without prompting.
To find text in multiple files:
- Click the Find In Files button on the toolbar.
- Enter the string to search for into the Find what input.
- Select the appropriate option in the
Look in input to select whether to carry out the search in all open documents, all
documents in the current project, all documents in the current solution, or
all files in a specified folder.
- If you have specified that you want to search in a folder, select the
folder you want to search by entering its path in the Folder input
and use the Look in files matching input to specify the type of files you want to search.
- If the search will be case sensitive, set the Match case option.
- If the search will be for a whole word—i.e., there will be whitespace, such as spaces
or the beginning or end of the line, on both sides of the string being searched
for—set the Match whole word option.
- If the search string is a regular expression, set the Use regular expression
option.
- Click the Find All button to find all occurrences of the string
in the specified files, or click the Bookmark All button to bookmark
all the occurrences of the string in the specified files.
To replace text in multiple files:
- Click the Replace In Files button on the toolbar.
- Enter the string to search for into the Find what input.
- Enter the replacement string into the Replace with
input. If the search string is a regular expression, the n back-reference
can be used in the replacement string to reference captured text.
- Select the appropriate option in the
Look in input to select whether you want to carry out the search and replace in the current or in all open documents.
- If you have specified that you want to search in a folder, select the
folder you want to search by entering its path in the Folder input
and use the Look in files matching input to specify the type of files you want to search.
- If the search will be case sensitive, set the Match case option.
- If the search will be for a whole word—i.e., there will be whitespace, such as spaces
or the beginning or end of the line, on both sides of the string being searched
for—set the Match whole word option.
- If the search string is a regular expression, set the Use regular expression option.
- Click the Replace All button to replace all occurrences of the string
in the specified files.