My Favourite ReSharper Shortcuts
February 7, 2011
ReSharper is an awesome tool. If you’re using it you probably agree and if you aren’t you should be. The productivity gains are incredible. The moment you see another developer step effortlessly through the code you’ll agree. (If you have no idea what I’m talking about, it’s a Visual Studio plugin)
So here is the list of shortcuts I use on a daily basis. (There are a few others I use from time to time but then I usually have to go lookup the shortcut first)
Ctrl+N – Search for a type
Ctrl+F12 – Search for a method
Ctrl+Click – Go to type
Ctrl+P – Parameter info
Ctrl+Alt+V – Extract variable
Ctrl+W – Expand selection
Ctrl+D – Duplicate line
Ctrl+Alt+D – Introduce field
Ctrl+Alt+N – Inline variable
F2 – Rename
Ctrl+Minus – Go to previous
Ctrl+Alt+B – Go to derived type
For everything else I usually hit Alt+Enter and check my options.
Bonus shortcut – I’ve configured my ReSharper to run a unit test when I hit Ctrl+R. If you want to do something similar go to keyboard shortcuts (Tools->Options->Environment->Keyboard) and search for the ReSharper.ReSharper_UnitTest_ContextRun. Under ‘Use new shortcut in’ select ‘Text Editor’.
Am I missing any of your favourite shortcuts? Happy coding.
Tags: C#
Ctrl+Alt+H – Type hierarchy
Alt+F7 – Find Usages
Ctrl+Alt+J – Surround with…
Ctrl+Alt+M – Extract method
Non-navigation:
Ctrl+Shift+R – Refactor menu
Alt+Ins – Generate code
Navigation:
Ctrl+B – Go to definition (keyboard version of Ctrl+Click)
Alt+Up and Down – move to previous/next member
Ctrl+[ - move to containing scope
Ctrl+] – move to matching brace
Alt+F12 – move to next compiler error (anywhere in the solution, if solution-wide analysis is enabled; otherwise in current file)
Ctrl+Shift+F7 – highlight all usages of the current symbol in the current file; color-coded highlighting (blue=read, pink=write); Ctrl+Alt+Up/Down to navigate between them; Esc to clear highlighting
My personal favorites are probably Ctrl+B, Ctrl+Shift+F7, and Alt+F12. But I use Ctrl+P and Ctrl+W and, well, a lot of these, pretty often.
Some really good ones here – especially Alt-F7 and Ctrl+Shift+F7. I really like the Navigation stuff – thanks Joe!
Ctrl+Shift+G – (Navigate from here)