If you are already using ReSharper as the programming artifact (Machine Killer), then it is necessary to be familiar with some of its special features and shortcuts in order to further improve work efficiency.
ReSharper is a Visual Studio plugin produced by JetBrains, and its power is well known, with its vs is powerful (assuming, of course, that your machine needs to add memory first). But a lot of people don't really use the power that it offers, and Vladimir Khorikov describes 8 features and their shortcut keys that people seldom know and use but are very useful for their daily work.
1, move up or down
The VS built-in feature makes it easy to move a line, but ReSharper's move function moves the entire method's position, the position of the property, the position of the statement line, and even the position of the parameter in the method signature. The default shortcut keys are: Ctrl + Shift + Alt + up/down/left/right, but for added convenience, the author suggests remapping to Alt + up/down/left/right.
The animation of the Move method is as follows:
2, navigate to the next and previous members
This feature is suitable for use with one of the above features, such as navigating to the following method and then moving the method up. The shortcut key for this feature is ALT + Up/down, which is now best mapped to Ctrl + Up/down.
The effect is as shown in the following animation:
3, navigate to the next error in the solution
The next most useful feature is navigating to the next error in the solution, allowing you to quickly navigate through all compilation errors. The default shortcut key is Shift + Alt + pagedown/pageup, and the author recommends the most convenient shortcut key is Ctrl + Shift + down/up.
4. Navigate to the methods and classes that belong to
This feature allows you to navigate to the method signature where the current line belongs, or to the definition of the class to which it belongs. Its default shortcut is Ctrl + [, which is handy.
This feature may not be so intuitive to explain in words, or see the picture at a glance:
5, select the method and class to which you belong
Sometimes, instead of navigating to the method and class that you belong to, you want to select the entire method or class, use CTRL + SHIFT + [, if the entire method you select also wants to select the entire class, then press CTRL + SHIFT + [.
6, List most recently edited locations
One of my most common features is to list recently edited files, and in one file you want to quickly go back to where you previously edited, then use the shortcut key Ctrl + Shift + Comma to list the most recently edited locations. Such as:
7. Locate the file you are editing in Solution Manager
VS built-in similar features, but requires a little mouse to operate. With ReSharper, you can quickly navigate by using the shortcut key Shift + Alt + L .
8, quickly add curly braces to a line of code
I'm going to do this before I move to the head of the line, and then add the opening parenthesis and rely on the editor to automatically add the closing parenthesis. But after using ReSharper's universal shortcut key Alt + Enter , click Enter to get it done.
Like what:
Since ReSharper can use MVP status to apply to license, I started to use it early, and by the current 9 version, the functionality is becoming more and more powerful. With it, code writing efficiency really improved a lot, and code specification, refactoring, etc. can rely on it. For friends that have not been used, it is really helpful to try out the shortcuts for friends who are already in use. JetBrains has a PDF document that publishes a complete list of shortcut keys, and there is a link to this PDF in the "read original".
Original address: http://enterprisecraftsmanship.com/2015/03/27/8-resharper-shortcuts-everyone-should-know/
Everyone should know. 8 Items ReSharper shortcut keys