Sponsored By Aspose - File Format APIs for .NET

Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more!

Start Flying With ReSharper (and windows in general) – Use the Alt-Key

I received this question a couple of days ago that I thought I would quickly take the time to respond to a question:

“At work over the past few weeks we’ve been watching your patterns talks on dnrTV.  We’ve found them really enlightening (we’re implementing some of them as I write this), but what has really amazed some of us is your use of ReSharper.  We have a printout of the default keymap for ReSharper, but we notice that you do some things using the keyboard that we would love to be able to do (and, in fact, didn’t even know were options in ReSharper).  One co-worker surmises that you have mapped your own keyboard shortcuts.  Is this the case, or are you just very knowledgeable of all of the shortcuts that ReSharper provides out of the box.  Either way, do you have any sort of keyboard mapping that you would be willing to share?  We’re always looking into ways to be better  – and what better way than to have a tool do all of the heavy lifting for you!!”


Here is the trick to getting really proficient with not just ReSharper, but also any and every program that windows throws at you. Start using the ALT key more!! With respect to the stuff that I am doing in ReSharper, let me confess that I have not mapped any extra keybinding other than the ones that come out of the box during the install.. Since 1.0 of ReSharper I have been leveraging , and will continue to use, the IntelliJ keyboard mappings. Before you can start leveraging the ALT key more effectively with ReSharper there is one thing you will have to do (you don’t have to, but it will save you an extra “R” in the keyboard sequences). If you are using VS2005 and you have both Refactor and ReSharper menu items (the Refactor menu is provided by the default install of VS2005, and will only show up if you are in a code file) you will need to remove the Refactor menu from your toolbar. If you want to get rid of it for good follow these steps:


  • Right click on the toolbar in VS and choose customize
  • Select the Commands tab
  • Click the Rearrange commands button
  • Ensure that the Menu Bar option is selected and choose the Refactor menu from the drop down list.
  • The Controls list should now be populated with all of the Refactor menu items.
  • Highlight the first item in the Controls list and hit ALT- D (delete).
  • Take care when deleting the last item as the list will automatically populate with the next set of controls from another menu item that you may not want to delete.
  • Click the close button on the dialog, and click the close button on the main dialog.
  • Voila, the Refactor menu item should be gone from your toolbar!!

Here are a couple of ReSharper key sequences that I use all of the time (I’ll leave it up to you to experiment):

  • ALT -> R -> N -> Enter – Create new class from file template template. This works because the first template in my list is the class template.
  • ALT -> R -> N -> I – Create new interface from file template.
  • ALT -> R -> N -> F – Create new TestFixture from file template
  • ALT -> R -> N -> M – Create new MockTestFixture from file template
  • ALT -> R -> W -> D – Bring up the TODO exlorer
  • ALT -> R -> O – Bring up ReSharper options

With respect to the TestFixture and MockTestFixture files templates, these are just one of many custom file templates that I use to help me get off the ground faster. I leverage ReSharper file templates a lot as it helps me start with code files that are much leaner than the studio counterparts.


Using the ALT key more will allow you to drop the mouse more than you think and start leveraging features directly from the keyboard.


Develop with Passion!!



This entry was posted in General, Programming. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

3 Responses to Start Flying With ReSharper (and windows in general) – Use the Alt-Key

  1. Evan says:

    you can also use Alt+Ins to generate off the file templates (when the cursor is in the solution explorer)

  2. cmyers says:

    I have ReSharper 3 and I don’t have a Refactor menu, so I didn’t need to do the first step.

    How much will it cost to get you to share some of those templates you have? :)

  3. Actually, I think ReSharper takes care of removing the refactor menu when installed. Anyway, most of the keys you’ll ever need are all in the cheatsheet available of JetBrains website.

Leave a Reply