Navigation

Go to type

With ReSharper you can always quickly navigate to a desired type. Press Ctrl + N key shortcut, and a small search window will popup. As you start typing in the text field, the lookup dialog appears suggesting you type names matching the entered substring (see the figure). A wildcard character * (asterisk), or + (plus) may be used in a search string to represent zero or more or, respectively, one or more characters. Optionally, you may also search among the library types.

If you select any type that belongs to the current project the caret will be positioned at the first line of code relevant to the type (the corresponding source file will be opened in the editor if necessary); for library types, the corresponding entry in the Object Browser will be displayed.


Go to file

To quickly open an arbitrary file belonging to the current project press Ctrl + Shift + N key shortcut. As in the case of Go to type, a small search window will be opened. Its interface as well as its behaviour is very similar to that of Go to type window.


Go to declaration

You can easily navigate to a declaration of a symbol under the caret. Press Ctrl + B keyboard shortcut, and the caret will be positioned at the selected type, method, field, or local variable declaration (the corresponding source file will be automatically opened if necessary). For library symbols the corresponding entry will be displayed in the Object Browser window.

Consider the following example:

After user presses Ctrl + B the caret gets repositioned as follows:

However, if we position the caret at TrimEnd symbol first and then press Ctrl + B, the Object Browser window will be opened at the declaration of the method TrimEnd of the class System.String.


Go to base

ReSharper allows users to navigate quickly to the declarations of base classes or overridden/implemented methods. Place the caret at the desired code item in the editor and press Ctrl + U keyboard shortcut, and the caret will be positioned at a base type method/declaration of the selected method/type (the corresponding source file will be automatically opened if necessary). For library symbols the corresponding entry will be displayed in the Object Browser window. You may easily see that a given method overrides/implements another method by the presence of special icons at the left gutter of the editor window (see Syntax & Error Highlighting).


Go to inheritor

This action is opposite to the Go to base action, in the sense that it behaves similarly but navigates the type hierarchy in the opposite direction. The only complicating detail is that there may be (and arguably in most cases there are) several inheritors of the same item, that is, there is more than one derived class, or more than one overriding method. To resolve this complication, whenever it appears, before repositioning the caret ReSharper pops up a list of possible inheritors for the user to choose.

Press Ctrl + Alt + B keyboard shortcut to invoke the action.

In the following example the base class Class1 has two inheritors Class2 and Class3. Position the caret as follows:

Choose the desired inheritor to get the caret positioned at the corresponding declaration.


Go to next/previous method

Within a class you can easily navigate to the next or to the previous method. Press Alt + Down to get the caret positioned at the beginning of the next method; press Alt + Up to get the caret positioned at the beginning of the previous method.


Go to last edit location

To swiftly position the caret at the latest location where you changed your code press Ctrl + Shift + Backspace keyboard shortcut. You may move to earlier edit locations by pressing Ctrl + Shift + Backspace several times.


Navigate through the current file structure

You can easily view the structure of the current file by pressing Ctrl + F12. You will quickly find a member of interest just by typing the first letters of its name. ReSharper will immediately navigate you to that member declaration in the editor when you press Enter.
Members are conveniently grouped by their types.
This is the quickest way of navigating through the current file structure, especially useful when you deal with really large files with numerous members.



Navigate through the recent files list

You can quickly switch between several files that were recently opened in the editor. Press Ctrl + E, and a list will open containing the names of 30 recent files. The length of this list is easily customizable. Press Enter to navigate to the selected file in the editor.


Go to type declaration

You can navigate to the declaration of the type a variable, field, or method under the caret. Press Ctrl + Shift + T keyboard shortcut, and the caret will be positioned at a declaration of a class/struct/enum that specifies the variable/field type or the type returned by the method (the corresponding source file will be automatically opened if necessary). For library symbols the corresponding entry will be displayed in the Object Browser window.

Consider the following example:

After user presses Ctrl + Shift + T Object Browser window will be opened displaying the type System.Char. Notice the difference with the Go To Declaration feature behaviour!


to the top