I Love ReSharper

Wed 24 January, 2007

This was going to be a post about the different VS 2005 plugins that I use, and some other useful programs for my everyday (most of them Open Source, by the way); but while I was writing it turned itself little by little into a love letter to Resharper. I can only say good things about this productivity plugin.

This are only some of its features:

  • Automatic warning and error checking while you write code; similar to the automatic ortographic revision from MS Office but quite more smart.
  • Better Intellisense. By far, my preferred feature and the one you tend to note first. If you want it to, ReSharper can completely replace VS2005’s Intellisense with its own, faster and more complete. You have the possibility of setting the same font for Intellisense and source code, you can replace Intellisense icons with ReSharper’s set, and add a pop-up with the complete method signature.
  • Code auto-completing, you write the first three characters of virtually anything and ReSharper is already displaying a list of alternatives. If what you’re writing is a method call, pressing TAB inserts the complete method name along with the () and the ;.
  • Templates.
  • Refactoring: you can extract properties from variables, or methods from code: you select a code block, select to extract it as a method, give to it a name and some options, among them are a list of possible parameters that ReSharper automatically detects and voilá!: method created.
  • Advanced search for method use.
  • Type hierarchy view
  • Unit test running with NUnit or csUnit from the IDE.
  • Context actions. In some sections of your code you can see a small floating window with a lightbulb icon. ReSharper wants to help: opening that window with your mouse (or even better, pressing ALT+Enter) ReSharper will show you a list of all the possible actions it can make depending on the code context: check for null values, reorder if sentences, refactor string concatenatios with an StringBuilder, delete unused references, and so on.
  • Automatic detection of unused variables, methods or references. If you declare a variable at the beginning of your code that you later don’t use ReSharper will remark it using a grey color (trust it, it’s quite more noticeable than it sounds), and with that you know that it’s not being used anywhere. ReSharper uses the same color to remark redundant and useless casts or uses.
  • Quick jump to a method or variable definition: using CTRL+Click on the method or variable name you can jump directly into the method or variable definition, if the code is avaliable.
And these are only the tool’s highlights, the tasks I do daily with it. Definitely, it’s the best buy I’ve ever made for a Visual Studio add-in; mostly because I used this last Christmas offer and got it for $99 instead of its normal price tag of $249, which is quite unexpensive if your firm buys it for you: not my case. I bought ReSharper for my exclusive use.

JetBrains development team make Visual Studio 2005 a better yet IDE with this product. The ongoing rumor that they are developing their own version of a .NET IDE, building of IDEA’s true and tested success is, sadly, outdated (look the comments), because it seems the project is abandoned. A real pity.