| Function |
Shortcut (Default) |
Description |
| Highlight symbol usage |
Ctrl + Shift + F7 |
Highlights highlight usages of any symbol in your code. Position the caret at the symbol you want to search for in the editor, and press Ctrl + Shift + F7. Read accesses and the write accesses are highlighted in different colors. |
| Comment selection - Line |
Ctrl + / |
Comments or uncomments the currently selected block using line comments (// example). Comparable to default VS chord command |
| Comment selection - Block |
Ctrl + Shift + / |
Comments or uncomments the currently selected block using line comments (/* example */). |
| Expand current selection |
Ctrl + W |
Extends current selection, successively selecting word, line, inner block, block, method, etc. (depending on code structure). |
| Contract current selection |
Ctrl + Shift + W |
Contracts current selection, reverse of expand current selection. Does not appear to fully work/cycle down, stops after a few attempts. |
| Stack trace explorer |
Ctrl + Shift + E |
You need to copy the contents of a stack trace on the clipboard first. After doing so, open the stack trace explorer and you can navigate to the lines of code listed as part of the stack trace. |
| Duplicate selection |
Ctrl + D |
Duplicate currently selected line or block of code, inserts below current selection. |
| Format code - current file |
Ctrl + Alt + F |
Invokes ReSharper's code formatting engine on the current file. |
| Remove unnecessary using directives |
Ctrl + Alt + O |
Removes any unused or redundant using directives from your code. Shortens redundantly qualified references where possible. Example: using System + System.String, System.String can be unqualified to String. |
| Show method signatures |
Ctrl + P |
Within a method call's parameter list, press Ctrl + P and a list of possible signatures with summary (from xml comments). |
| Insert code |
Alt + Insert |
Triggers code generation, displays pop-up menu that lets you choose to insert constructors, property accessors, implemented interface members and overridden inherited methods. Works smartly, e.g., will generate property accessors for multiple values, but only lists member fields without existing accessors, will let you quickly pick member fields to initialize in an overloaded constructor. Worth experimenting with. |
| Surround with |
Ctrl + Alt + J |
Does just about what it sounds like--allows you to surround the currently selected block of code with various code constructs. Examples: #region #endregion, do… while, lock, using. These surrounding snippets are customizable. |
| Insert template |
Ctrl + J |
Opens a pop-up menu for inserting a code template at the current selection. ReSharper's Live Templates can also be invoked by typing the abbreviation for the template and then pressing the Tab key. Example: "itar" and then Tab = basic for loop where you can tab through and change the counter, bound, iterated object, source, etc. These are fully customizable. |
| Type completion |
Ctrl + Alt + Space |
Type a letter or two for the type you're thinking of. Hit Ctrl + Alt + Space, ReSharper will display a list of possible suggestions that you can select to complete the type name. Additionally, if you lack the attendant using declaration in your code after selecting a given type, ReSharper adds it. Example: in a file without a using declaration to System.Xml, in class or method type "xm" and Ctrl + Alt + Space. Type "ln", select XmlNodeChangedEventArgs. The type name is completed and System.Xml is added to your using declarations. |
| Smart completion |
Ctrl + Shift + Space |
Selects from a list of types, methods and variables to try and match the expected type of an expression. Example: create a method that returns int. Within its body, type "return ", press Ctrl + Alt + Space, a popup list of available variables of int type will appear. |
| Navigate next error/warning |
F2 |
Cycles cursor to the next error or warning in your code. Not a great default mapping. |
| Navigate previous error/warning |
Shift + F2 |
Cycles cursor to the previous error or warning in your code. |
| Navigate to type |
Ctrl + N |
Displays pop-up menu that allows you to search and select a type. If the current type is a class defined within your code, it will take you to the class. If not (library types), it will take to the corresponding entry in the Object Browser. |
| Navigate to type - direct |
Ctrl + Shift + T |
Navigates to the declaration of the currently selected type, method, field or variable's type. Library types navigate within Object Browser. |
| Navigate to file |
Ctrl + Shift + N |
Displays pop-up menu that allows you to search and select a filename that is part of the current project. The selected file will be opened in the editor. |
| Navigate to declaration |
Ctrl + B |
Navigates to the declaration of the currently selected type, method, field or variable. Library types navigate within Object Browser. |
| Navigate to base |
Ctrl + U |
Navigate to the base type method/declaration for the currently selected method/type |
| Navigate to inherited |
Ctrl + Alt + U |
Navigate to derived classes or overridden methods for the current class or method. |
| Navigate next method |
Alt + Down |
Cycles forward to next method declaration. |
| Navigate previous method |
Alt + Up |
Cycles backward to previous method declaration. |
| Navigate to last edit |
Ctrl + Shift + Bksp |
Goes to the last location of your last code edit. |
| Navigate code tree |
Ctrl + F12 |
Displays a pop-up window outlining the code structure of the current file. Selecting a listed element takes you there. |
| Navigate recent files |
Ctrl + E |
Displays a list of recently used files for the editor, navigates to a file upon selection. |
| Find Usage |
Alt + F7 |
Finds usages of namespaces, types, methods, fields and local variables. |
| Navigate to usage |
Ctrl + Alt + F7 |
Displays a pop-up menu allowing direct navigation to found usages of the currently selected type, field, method or variable. |