The Resharper Challenge: What if You Could Only Have 7 Features?

I was working with someone who doesn’t have ReSharper today and I noticed for the first time that I have developed some feature addictions because I actually winced when I watched him fully type out a property and then manually do an “extract method” refactoring.

This surprised me since I have only really been consistently using ReSharper for the last month and am still far from my goal of becoming a ReSharper Jedi. Nevertheless, the dozen or so keystrokes that I have mastered and consistently use are making a noticeable difference in removing some of the coding noise that usually distracts me and slows me down while coding.

In keeping with the lucky seven theme from my last post, I decided to share seven favorite features. In other words, if there were suddenly a terrible ReSharper feature shortage and the Programming Gestapo started forcing everyone to ration their features, this is what I would choose.

(NOTE: All shortcut keys are according to the VS Bindings)

  1. Auto-inserting using statements (alt + return at prompt) – This is by far my favorite feature. How does it know what I wanted so quickly?
  2. Generating properties, constructors, & overrides (Alt + Ins) – For properties, it lets you choose from a list of private variables without properties. For constructors, it lets you choose from a list of possible properties to use as parameters.

  3. Identifying Dead Code (text colored gray): No more excuses for letting unused code clutter your code base.
  4. Extract Method (Ctl + Alt + M) – It figures out which parameters you’ll need to pass in and replaces the highlighted text with a call to the new method.
  5. Rename (F2) – This is a LOT smarter and quicker than the Visual Studio Find & Replace.
  6. Find Usages (Shift + Alt + F12) – This also beats the pants off of Find & Replace for doing impact analysis.

  7. Go ToType (Ctl + N) - I like how it pops up at my cursor, filters the list while I type, and shows the location of the files.




I fully expect this list to change as I get more proficient with the tool and as I start working on a 2.0 .NET project instead of a 1.1 project so that I can use the latest version of ReSharper.

Which seven features would you choose? If you had to recommend one killer feature that I am missing out on, which one would it be?

Popularity: 6% [?]

7 Comments so far

  1. Tom Opgenorth on October 23rd, 2007

    I wouldn’t play. I’d switch to Java and get me a copy of IntelliJ. :)

  2. Russell Ball on October 24th, 2007

    Very tricksy. I never thought of it before, but I guess JetBrains has managed the impossible. They have gotten both Microsoft and Java developers to like the same software vendor.

  3. Steven Mitcham on October 24th, 2007

    I would replace the generate constructors item with Introduce Parameter (CTRL-R + P).

    I just recently found the generate constructors feature, but in combination with extract method and the new feature that suggests ‘broader’ parameters with a green underlines, I get a lot more effect from my refactoring by easily parameterizing the extracted method.

  4. Russell Ball on October 25th, 2007

    @Steven: Good suggestion! I just played around with it and it looks like it will be a good technique for removing dependencies within code so that they will be more testable.

  5. James Kovacs on October 25th, 2007

    Hard to give up any of those features as I use them frequently. Other features to check out (using IntelliJ bindings)… One that you didn’t list that is a killer ReSharper feature is go to Declaration (Ctrl-B) and go to Inheritor (Ctrl-Alt-B). This is a fantastic way to navigate a codebase quickly. Combine that with VS’s CTRL-”-” to go back and code exploration is a snap.

    Another trick in becoming a ReSharper Jedi is Introduce variable (Ctrl-Alt-V). You need a variable… Type the following:
    new Foo()
    Now Ctrl-Alt-V with your cursor after the close paren, enter to select the suggested variable name, and the line becomes:
    Foo foo = new Foo();
    Now if it would only use IFoo as my type if it existed… :)

  6. Russell Ball on October 26th, 2007

    @James – I also am a big fan of the 2 navigation features you mentioned, but I never tried the introduce variable one before. That’s definitely a keeper. Thanks for the suggestion!

  7. [...] also wrote a few posts on the topic, including my favorites from about a year ago and my recent efforts to break out of my R# rut. I learned a ton of new things as I was preparing [...]

Leave a reply