How to live without ReSharper

NoResharper

This was no ordinary task to be accomplished, I'll give you that. I was always pressing ALT+ENTER to get my stuff right, and nothing happened. Still, as the saying goes, with time, everything settles.

Things you need

  1. Microsoft Visual Studio 2015 - Download
  2. Some extensions

Lets back-up a bit

Don't get me wrong, ReSharper is an awesome tool, and by far is the best out there, but for different reasons I have come to the conclusion that it is not the right tool for me. I recently upgraded ReSharper to version 9, and from that moment on, all hell broke loose, with laggier VS installation, and multiple crashes. After getting tired of restarting my VS for like 10 times a day, I thought of the most important things I use from the ReSharper platform.
The resulting list was a shock for me: from all that ReSharper has to offer I was using just a small part, some handy things, which (partially fortunately), I have found some replacements. :)


The list

As I previously said, my list narrowed down to some useful parts of the ReSharper platform, and they were generally related to these:

  1. Go to implementation
  2. Find usages
  3. Duplicate line
  4. Camel humps
  5. CTRL+CLICK on a function
  6. Surround with {}
  7. Go to file / go to type

Apparently, a lot of ReSharper's actions were misused, so I decided to take a look at individual extensions that would help me replace those ReSharper functionalities.


Extensions

  1. Go to implementation


    This is one of the most used feature that ReSharper has to offer me. Since most of the times I'm working on big projects, with a lot of dependencies and a lots of interfaces, it is really hard to track the objects, which where goes, and that sort of stuff. For that, ReSharper got to offer me the Go to implementation feature, which would build up a tree of dependencies between objects, and their interfaces.
    The closest I got to this functionality is the one offered by Tomasz Gołębiowski, the Go To Implementation extension. You can easily install it from VS's Tools->Extension & Updates.
    Go To Implementation

  2. Find usages


    I'll have to admit: this was a bummer for me. Apparently there aren't any extensions around to do the Find Usages functionality from ReSharper as ReSharper does, or I haven't found them yet. To actually replace this functionality, I use the VS's built in Find all References
    Find all references
    This is a lesser functionality, because it packs both, the definition and the call usages of that function, plus that is doesn't really supports JavaScript functions that well. Still, it is better than nothings, and it provides me with the needed guidelines to figure out myself the rest (I know, I still have to think... :) ).

  3. Duplicate line


    This a handy functionality that ReSharper offers, that of duplicating a selection, or a line, if nothing was selected. The closest I got to it was the extension with the same name, Duplicate Selection offered by Chris Lajoie.

  4. Camel humps


    This is quite a "hidden" feature that not many people know about it. I find it very useful, since it offers the possibility of camel humping when moving though the text. So, for example, we have a generic class named ReviewSate. When navigating via CTRL+LEFT-ARROW or CTRL+RIGHT-ARROW the navigation would skip the whole word, but with camel humps activated (ReSharper->Options->Environment->Editor->Editor Behavior->Use CamelHumps) you would stop with the caret between Review and State.
    As a replacement for this, I found the Subword Navigation extension, provided by Olle Westman, which offers some short-cut keys to actually complete these. They can be easily mapped via Edit.Subword* commands.
    Subword navigation

  5. CTRL+CLICK a function


    One of my most used functionalities, the CTRL+CLICK on a function name, takes you to its definition. Usually, when I'm navigating the code, I do it by scrolling up and down. When something catches my eyes, I instinctively CTRL+CLICK on it. Well, this changed when I removed ReSharper. The closest I got to this, was when I installed Productivity Power Tools 2015, a product offered by Microsoft. It will still provide a peek definition of the function thought, but that's ok.

  6. Surround with


    Among other nifty things that ReSharper offers, is the extension of code snippets for Visual Studio. One of which, was the one of surrounding a selected text with brackets. I find it very useful when refactoring, or introducing constants. For this, I implemented my own code snippet, as simple as I could do it.

    											
    <?xml version="1.0" encoding="utf-8" ?>
    <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    	<CodeSnippet Format="1.0.0">
    	<Header>
    		<Title>{}</Title>
    		<Shortcut>{}</Shortcut>
    		<Description>Snippet for surround with {}</Description>
    		<Author>Lucaci Andrei</Author>
    		<SnippetTypes>
    			<SnippetType>Expansion</SnippetType>
    			<SnippetType>SurroundsWith</SnippetType>
    		</SnippetTypes>
    	</Header>
    	<Snippet>
    		<Code Language="csharp"><![CDATA[{ 
    			$selected$ $end$ 
    				}]]>
    			</Code>
    		</Snippet>
    	</CodeSnippet>
    </CodeSnippets>
    											
    										

    This can also be expanded with any sort of surrounding with type (such as #region)
    
    <?xml version="1.0" encoding="utf-8" ?>
    <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    	<CodeSnippet Format="1.0.0">
    		<Header>
    			<Title>#region</Title>
    			<Shortcut>#region</Shortcut>
    			<Description>Snippet for surround with #region</Description>
    			<Author>Lucaci Andrei</Author>
    			<SnippetTypes>
    				<SnippetType>Expansion</SnippetType>
    				<SnippetType>SurroundsWith</SnippetType>
    			</SnippetTypes>
    		</Header>
    		<Snippet>
    			<Code Language="csharp">
    		<![CDATA[#region $end$ 
        			$selected$
    				#endregion]]>
        		</Code>
    		</Snippet>
        </CodeSnippet>
    </CodeSnippets>
    
    

  7. Go to file / go to type


    Again, one of ReSharper's most used functionality, is that of navigating to a file / to a type. For this functionality, I used VS's build it mechanism for navigating to a type / file. VS combines both searches into one, so it displays also the matching types as well, when searching for specific files. Still, it is better then not having anything. :)


My personal shortcuts

I have tried to map some shortcuts for these new extensions, so that it would suit me better. Here's a list of my shortcuts, that I use in conjunction with these extensions:

  1. ALT+S, ALT+W maps the surround with snippet.
  2. CTRL+SHIFT+T maps the Edit.NavigateTo type or file.
  3. CTRL+D maps the duplicate selection.
  4. CTRL+CLICK maps the Productivity Power Ttools 2015 Peek definition
  5. ALT+D, ALT+D maps the VS's go to declaration (ReSharper's CTRL+CLICK)
  6. ALT+LEFT-ARROW maps the camel hump navigation to left
  7. ALT+RIGHT-ARROW maps the camel hump navigation to right
  8. ALT+SHIFT+LEFT-ARROW maps the camel hump navigation to left plus selecting the text
  9. ALT+SHIFT+RIGHT-ARROW maps the camel hump navigation to right plus selecting the text
  10. ALT+BACKSPACE maps the camel hump deletion to left
  11. ALT+DEL maps the camel hump deletion to right

All these shortcuts can be imported from my VS settings, which you can find here (Download settings - please don't forget to install first all the extensions, then import the settings, since VS will ignore the unknown mappings).


Conclusions

I will be short in this section. I know that these extensions cover a small part of ReSharpers functionalities, but this were the settings that interested me more. If you have different opinios, or have improvements or new extensions to add to the list, please, don't hesitate to contact me (email is in the bottom of the page).
Regards,
Lucaci Andrei