16 Tips for Getting Up to Speed & Exploiting the Power of CodeRush and Refactor! Pro

25 April 2008
#1: Dock the CodeRush training window (DevExpress | Tool Windows | CodeRush) next to the editor.  This training window displays context-sensitive keystrokes and code template shortcuts as you work, and is designed to help you learn much of CodeRush without diving into the User Guide.

#2: Add frequently-used classes to the template type mnemonics by right-clicking any reference to that type in the code and choosing “Use Type in Templates…”, and then specifying a shortcut mnemonic to associate with that type.

Once added, your new mnemonic will work with all the template “verbs” which are followed by an ellipsis in the CodeRush training window. Custom mnemonics can be edited on the Dynamic Lists options page:

1. From the DevExpress menu, select "Options...".
2. In the tree view on the left, navigate to this folder:

    Core

3. Select the "Dynamic Lists" options page.
4. Change the language combo to *Neutral*. Remember to change this back to your favorite language when editing the data on other options pages.
5. Select the "Custom Types" dynamic list.

#3: Access training videos through the DevExpress menu, or online here

#4:
Watch this DNR TV session demonstrating CodeRush and Refactor! Pro.

#5:
Read the User Guide. From the DevExpress menu select “User Guide”. Use the TreeList to drill into topics of interest.

#6: Review the complete list of refactorings in Refactor! Pro. 

#7: Navigate through all references to the identifier or type at the caret by pressing the Tab key (Shift+Tab navigates back, and/or Escape brings you to the place where you first pressed Tab).

#8: Press Alt+Home to drop a stack-based marker. Press Escape to collect it. Stack-based markers are like bread crumbs and help you find your way back through important points in your code.

#9: Widen the selection by logical blocks by pressing Num + on the numeric keypad, or Ctrl+W. Once a selection has been widened, you can reduce it using Num - on the numeric keypad, or Ctrl+Shift+W.

#10: Wrap multi-line selections in try/catch blocks just by pressing the letter "c". Look to the training window for more wrapping shortcuts when the selection extends beyond two or more lines.

#11: Create brace block pairs in C#, C++, and JavaScript with the b template (type the letter "b", then press the spacebar). Similarly, you can wrap a multi-line selection inside braces by pressing the letter "b".

#12: Change the visibility of the member or type containing the caret by pressing the Alt+Up and Alt+Down keys.

#13: Navigate between camel-case sections by pressing Alt+Left or Alt+Right. Combine that with the Shift key to select camel-case sections.

#14Rebind the default Refactor key binding (Ctrl+` -- that's Ctrl plus the backtick) to something easier to hit. I prefer Num 0 on the numeric keypad. Scott Hanselman prefers simply the backtick. You can change this binding through DevExpress | Options, then navigate to the IDE\Shortcuts options page and open the Refactor! folder. While you're here, check out the alternate shortcut bindings that you can simply enable (like F2 for Rename).

#15: Use the Refactor key for TDD-style development. Create your client calls first, then press the Refactor key to declare method stubs, classes, structs, interfaces, fields, locals, etc.

#16: Confidently use CodeRush and Refactor! Pro with the latest language features of Visual Studio 2008, like LINQ expressions in C# and VB, lambda expressions in C#, and XML literals in VB. Yes, we do realize Visual Studio 2008 has been out for something like six months, and you would think that by now competing products would have final shipping support for C# 3.0 and VB 9. Unbelievably, that still isn't the case. Of course, CodeRush and Refactor! Pro have included full support for C# 3.0 and VB 9.0 (and many other languages) since the day Visual Studio 2008 shipped.

5 comment(s)
DotNetKicks.com

You've been kicked (a good thing) - Trackback from DotNetKicks.com

26 April, 2008
Sam Gentile

Yesterday's big announcement was just a start. We have an even bigger one, hopefully today. Meanwhile

26 April, 2008
Dominik Guder

Nice list, for speeding up with coderush/refactor!

I'm just wondering if there exists any information for speeding up coderush/refactor! itself? Esp. the loading time on VS startup? It would be nice, if there is some kind of HowTo.

So far

Dominik

28 April, 2008
Zack Jones

I would love to see a series of tutorials showing each of the refactorings with before and after screen captures. There's several I see on the list that I have no idea what they really do :(.

28 April, 2008
David Yardy

Mark, please keep providing tips and videos that show the value of CodeRush and Refactor Pro.  I am a big user of this product but find there are tons of things I just don't know yet.

Great job.

23 May, 2008

Please login or register to post comments.