ReSharper 2021.1 Help

Go to Text

ReSharper | Navigate | Go to Text…
ReSharper_GotoText

Control+N 3 times

This navigation command lets you quickly find and navigate to any text in source and textual files of your solution. Besides files of supported languages, you can locate text in any text files in your solution. This command generally works much faster that Visual Studio's native Find in Files command, but as a downside, it does not support regular expressions.

By default, navigation to text is integrated into Search Everywhere Control+N — ReSharper will show textual occurrences matching the query string in the end of the results list, after all matching types, symbols, and files. You can disable this behavior by clearing Integrate Go to Text into Search Everywhere on the Environment | Search & Navigation page of ReSharper options.

Note that this command works in global scope, that is you do not need to bring your focus to the editor to invoke it.

Navigate to a text occurrence in code and textual files

  1. Press Control+N 3 times or choose ReSharper | Navigate | Go to Text… in the main menu

  2. In the Find text popup that appears, start typing text you want to find. As you type, the lookup list narrows down, suggesting entries that match the entered text.

  3. If you have navigated with this command during your current Visual Studio session, the last 10 strings you used for search appear in the list while the search field is empty.
    If some text is selected in the editor or copied to the clipboard from Visual Studio, it appears in the search field.

  4. By default, the text field is case-insensitive here. If necessary, click Match case to make the search case-sensitive.

  5. Optionally, you can type the following filters before or after the search query:

    • /ext:- to limit the search to files with specific extension, for example, /ext:cs

    • /fm:- to limit the search to files matching specific mask, for example, /fm:I*.cs

    • /cp- to limit the search to files in the current project.

    • /.- to limit the search to files in the current folder.

  6. Do one of the following:

    • Click the desired item to open it in the editor.

    • Select the desired item by pressing Up and Down and then press Enter to open it in the editor.

    • To view and analyze the list of matched items in the Find Results window, click Show in Find Results Themed icon search results screen gray, press Shift+Enter or + on the numeric keypad.

ReSharper can remember the last input that you used to find something with Search Everywhere/Go to Type, Go to Symbol, Go To File, and Go to Text actions. To enable or disable this behavior, use the Remember last search checkbox on the Environment | Search and Navigation page of ReSharper options. When this option is selected, ReSharper will also use your current selection in the editor as the initial search query.

By default, ReSharper enables fuzzy search, so that it takes into account various typos and missing words.

Fuzzy search results are displayed in a separate section of the result set:

ReSharper: Fuzzy text search. Typos in the query

Since Go to Text searches all text, you can also search source code with it — even if your search is not an exact match:

ReSharper: Fuzzy text search. Occurrences in the  code

Fuzzy search also helps looking for strings that contain format specifiers or use string interpolation:

ReSharper: Fuzzy text search. Results with format specifiers

If you want only direct matches in the search results, you can disable fuzzy search by clearing the Fuzzy results in Go to Text checkbox on the Environment | Search & Navigation page of ReSharper options(Alt+R, O).

This feature is supported in the following languages and technologies:

Language: C#Language: VB.NETLanguage: C++Language: HTMLLanguage: ASP.NETLanguage: RazorLanguage: JavaScriptLanguage: TypeScriptLanguage: CSSLanguage: XMLLanguage: XAMLLanguage: ResxLanguage: Build ScriptsLanguage: ProtobufLanguage: JSON
Feature is available in C#Feature is available in Visual Basic .NETFeature is available in C++Feature is available in HTMLFeature is available in ASP.NETFeature is available in RazorFeature is available in JavaScriptFeature is available in TypeScriptFeature is available in CSSFeature is available in XMLFeature is available in XAMLFeature is available in Resource filesFeature is available in build script filesFeature is available in ProtobufFeature is available in JSON

The instructions and examples given here address the use of the feature in C#. For details specific to other languages, see corresponding topics in the ReSharper by Language section.

Last modified: 09 March 2021