It is always important to find proper things quickly. ReSharper comes with many features to find files, code references, or navigate through your code quickly. Now let us find out how to use these features.
In this chapter, we will cover the following topics:
In every project, code is divided into files. Depending on the size of your application, there can be hundreds or even thousands of files. More files make it harder to find the right one. ReSharper provides you with a few features that can help you find the file you need, quicker.
Every time you search for something in ReSharper, you can use the following wildcards:
CamelHumps are also supported by ReSharper and you can specify the line to which you would like to go.
The easiest way to find a file is to search it by its name. With ReSharper, it is very easy—just press Ctrl + Shift + T (Go to File) and write the name of the file that you would like to open.
Another useful way to open the proper file is to find a type contained in it. The type can be class, enum, and so on. Let's press Ctrl + T, T (Go to Type) and type the name of your class or any other type that you need.
Even if your project contains thousands of files, you are usually working on only a couple of them. In this case, it can be helpful for you to display a list of Recent Files. Just press Ctrl + , and you will see a list similar to the following screenshot:
Another often-used shortcut is Shift + Alt + L. It selects the currently opened file in Solution Explorer. It is useful when you need to open the current file properties or just open a file in the same folder.
Bookmarks allow you to mark the most important places in your code and quickly navigate to them.
You can add up to 10 numbered bookmarks and unlimited non-numbered bookmarks. To create a numbered bookmark, just press Ctrl + Shift + any number from the keypad. With the same shortcut, you can remove the bookmark—just press it a second time on the same line. To go to a numbered bookmark, press Ctrl + that number.
You can also display a list of all bookmarks using the Ctrl + ` shortcut. The same shortcut allows you to manage non-numbered bookmarks.
The following screenshot presents a list of created bookmarks and markers with numbered bookmarks:
Additionally, to move between bookmarks, you can easily jump to the latest place at which you edited the code. To do this, press Ctrl + Shift + Backspace.
As you can see, ReSharper allows you to find the proper file by searching for it using the name or type contained in it. To do this, you need to use different shortcuts, but not if you are using ReSharper v8.
ReSharper v8 comes with a new way to find files—Go to Everything. This is a merged version to search by name or type and really allows you to search everything! You can search almost everything you have in your code by your class name, method, and properties.
To use the Go to Everything feature, just press Ctrl + T.
3.145.70.170