MicroTip: ReSharper Navigation

I've read a couple times that the difference between the apprentice and the master performing a the same task isn't one big thing, it is many, many small things that together make a big difference. To that end, I am going to share the small things that help me work more efficiently under the title MicroTips. Here is the first of (hopefully) many:

ReSharper is a very powerful add-on for Visual Studio that improves the way one develops .NET code, but only if you know how to use it. (To see a ReSharper Jedi in action, go here.) One of the primary ways it improves one's ability to express thought in code is to eliminate the need to context switch from keyboard to mouse for navigation.

First of all, you need to configure the keyboard shortcuts. Do yourself a favor and learn the IntelliJ IDEA shortcuts now, because you will eventually find the Visual Studio flavored shortcuts are inefficient as they each require 2 keystrokes for common activities while the IDEA shortcuts only require 1.

Memorize and use (practice) these every time you need to navigate in your code:

Ctrl+N => Navigate to Type by Name. Learn to use the CamelHumps to save typing and time.
Ctrl+B => Navigate to Type under the cursor. This is the same as Ctrl+Click, but better.
Ctrl+Shift+B => Navigate to Derived Type (Implementation/Inheritor.) You will need this when properly coding to interfaces.
Ctrl+- => Navigate back to previous location.
Ctrl+F12 => Navigate to class member by Name.
Ctrl+Alt+L => Locate File in Solution Explorer. This one is useful when you need to move from the code behind to the markup in a web project. [Ctrl+Alt+L, Up Arrow, Enter]
Ctrl+Shift+N => Navigate to File by Name.

Thats it for this time. Just getting around in your code. If you can't live without your mouse, try unplugging it for an hour and see if you can't figure out how to navigate your code with your keyboard.

Comments

Popular posts from this blog

Simpler Tests: What kind of test are you writing?

Architecture at different levels of abstraction

TFS to SVN Conversion with History