Resharper

Resharper – Surround with Quotes (“”)

Here is an option that is very handy, but seems to be turned off by default.   Have you ever had a bit of code or text that you wanted to throw into a string, surrounded by quotes?  Well there is a context action available in Resharper that makes a context action available.  This works in the C# section, not sure if a similar option is available in other contexts.

Resharper-Surround-With-quotes

Once this is enabled, you can highlight some text in your code, pull up the context action menu (Alt-Enter) and you’ll see the option.

Resharper-Surround-Context-Menu

Advertisements
.NET, Resharper

Resharper – Navigate to Type Goodness

In my opinion the navigation improvements made by Resharper are where much of my productivity gains come into play.  When I can quickly find and navigate around my project, I can stay more focused on solving the problem at hand rather than trying to fumble through my project structure remembering where things are.

One of my favorites lately is Go To Type of Symbol (Ctrl-Shift-T in Resharper keymap, Ctrl-Shift-F11 in the Visual Studio keymap).  At it’s simplest, put your cursor on a variable and hit the keystroke.

Photo1

If there is only one match, it simply takes you to the definition of the type (in your source or object browser if not).  Simple, but quick and easy.

The fun begins when there is more than one type.   The handiest example of that is when I have a List<> variable.   Then the Go To Type brings up not only the IList<> ( which I realize may be of limited usage), but it also brings up the type in the list (which is normally what I want to get at).

photo2

This get’s me quickly to what I’m looking for.

One more shortcut in my arsenal to move me quickly around my project.  Enjoy!

Resharper

Resharper – Paste from Clipboard History

Sometimes it’s the simple things that make my day when I’m coding.  This is one of those items that once I bothered to learn the keystroke, has made my time coding that much more productive.

I’ve used Resharper for years (since v2) and while I’ve stumbled upon this feature a few times, I’ve never really bothered to get in the habit of using it.

It’s the Pasting Items from Clipboard History  feature.   Shortcut for this is Ctrl+Shift+Alt+V in both keyboard themes (Note:  I did notice that in my VS2015 RC installation the keystroke was Ctrl+Shift+V, so it could be either of those depending on your setup)

When you select the paste (and assuming you’ve pasted some items to the clipboard while in Visual Studio) you’ll be presented with the clipboard screen;

Resharper-Paste-Multiple

From that screen it’s simple to cursor down to the entry you want and hit Enter to paste it into your current location.  You can also select the number or letter that prefixes the selection.  Pretty simple.

In just two days of using this feature, I’d say it’s increased my performance when I’m making multiple similar changes in some code.   Sometimes it really just is the simple things that really make a difference.