ict.ken.be

Delivering solid user friendly software solutions since the dawn of time.

Resharper Shortcuts

Categories: Notes Shortcuts

ReSharper Fundamentals

by James Kovacs

It wasn't the end of the world, but at least we got cheap licenses from JetBrains. Tx

Check their site for docs and videos.
Keep your hands on the keyboard.

Code Browsing

Navigate ALT-R,N
Find ALT-R,F
Navigate To ALT-µ

Goto Type CTRL-T use capital abbreviations
Goto File CTRL-SHIFT-T
Recent Files CTRL-, (VS edit.navigate.to)
Related Files CTRL-ALT-F7

Next Member ALT-UP
Previous Member ALT-DOWN
File Member CTRL-\
?? Containing Declaration CTRL-[

Goto Derived ALT-END
Goto Implementation CTRL-F12
Goto Base ALT-HOME
View Type Hierarchy CTRL-E,H
Goto Declaration F12
Goto Type of Symbol CTRL-SHIFT-F11

Find Usages SHIFT-F12
Highlight Usages ALT-SHIFT-F11 was Debug.StepInsideSpecific
Next Usage CTRL-ALT-PAGEUP
Previous Usage CTRL-ALT-PAGEDOWN
Advanced Find Usages CTRL-ALT-SHIFT-F12

Set/Remove Bookmark CTRL-SHIFT-[0-9]
Goto Bookmarks CTRL-[0-9]
View Bookmarks CTRL-µ

Goto Symbol ALT-SHIFT-T
Inspect This CTRL-ALT-SHIFT-A

Locate File ALT-SHIFT-L (VS team and diagram)

Code Cleanup

Quick Fix ALT-Enter
Next Highlight ALT-PAGEDOWN
Previous Highlight ALT-PAGEUP

Move Code Up/Down CTRL-ALT-SHIFT-UP/DOWN
Move Code In/Out CTRL-ALT-SHIFT-LEFT/RIGHT
Clipboard ring CTRL-SHIFT-V
View File Structure CTRL-ALT-F

Code Cleanup CTRL-E,C
Silent Code Cleanup CTRL-E,F
Resharper - Options - Code Editing - C# - Formatting Style - At end of line (K&R style)
Code Style Sharing - Per solution stored in a file.
You can select solution, project or folder and it will do cleanup everywhere.
Remove Unused Code ALT-ENTER
Safe Delete ALT-DEL

Refactoring

Refactor This CTRL-SHIFT-R
Extend Selection CTRL-ALT-RIGHT
Shrink Selection CTRL-ALT-LEFT
Rename CTRL-R,R

Introduce Variable CTRL-R,V
Introduce Field CTRL-R,F
Inline var/field CTRL-R,I

Extract Method CTRL-R,M
Inline Method CTRL-R,I
Introduce Parameter CTRL-R,P

Create New File CTRL-ALT-INSERT
Move Static Member CTRL-R,O
Move To Another File CTRL-R,O
Move To Folder CTRL-R,O
Move Type To Namespace CTRL-R,O
Static <> Extension CTRL-SHIFT-R
Method <> Property CTRL-SHIFT-R
Method <> Indexer CTRL-SHIFT-R
Encapsulate Field CTRL-SHIFT-R
Property <> Autoprop CTRL-SHIFT-R
Extract Superclass CTRL-SHIFT-R
Extract Interface CTRL-SHIFT-R
Pull Member Up/Down CTRL-SHIFT-R
Copy Type CTRL-SHIFT-R
Constructor to factory CTRL-SHIFT-R
Anonymous to Named CTRL-SHIFT-R
Interface <> AbstractClass CTRL-SHIFT-R
Use Base Type Where Possible CTRL-SHIFT-R
Extract Class from Parameters CTRL-SHIFT-R
Resource extraction CTRL-SHIFT-R
Code Editing - Localization - Uncheck don't analyse verbatim strings
Project - Properties - Localizable Yes - Inspector Pessimistic - [Localizable(false)]
Goto base ALT-HOME
Goto derived ALT-END
Change Signature CTRL-R,S

 Coding Assistance

Symbol Code Completion CTRL-SPACE
Smartcode Completion CTRL-ALT-SPACE
Import Symbol Completion ALT-SHIFT-SPACE

Coding Backwards CTRL-R,V
Complete Statements CTRL-SHIFT-ENTER
Duplicate Line/Selection CTRL-D
Comment/Uncomment Line CTRL-ALT-/
Comment/Uncomment Block CTRL-SHIFT-/
Surround With CTRL-E,U

Parameter Info CTRL-SHIFT-SPACE
Quick Docs CTRL-SHIFT-F1
Solution Wide Analysis Gray dot in right bottom corner

 Micro Code Generation & Templating

Generate Code ALT-INSERT
Implement delegating members
New file template - Resharper - Templates Explorer - File Templates
Insert Live Template CTRL-E,L
Create Live Template ALT-R,T,R
$END$, $PROP_TYPE$, $PROP_NAME$, $CLASS$, $SELSTART$, $SELEND$, $SELECTION$, ...
Users - User - AppData - Roaming - JetBrains - ReSharper - v7.1 - vs10.0 - UserSettings.xml

 Grab Bag of Useful Extras

Explore Stack Trace CTRL-E,T (copy stack message to clipboard first)
Todo-List CTRL-ALT-D

Run all tests ALT-R,U,N
Run test in context ALT-R,U,R
Run test in session ALT-R,U,C

Patterns Catalog
Download from JetBrains : Sample pattern catalog for Structural Search and Replace
ReSharper | Options | Code Inspection | Custom Patterns and click Import.

MSBuild and Nant helpers CTRL-ALT-F (only for .csproj)