33

I was using CodeRush quite while ago and now I'm planning to use it again. I've installed the trial but I forgot all the cool features except Alt + Home (drop a marker). And when you don't know some cool tricks it's really like burning money (since it's not cheap for personal use).

What do you like about it? What are your best features?

My best feature is marker: Alt + Home (and use escape to go back)

Currently What I like most

  • p s space / p i space, etc. templates to create properties.
  • c c space to create constructors.
  • Pressing Tab to navigate between references to identifiers.
  • Shift + F12 to find references in new cool window.
  • Ctrl + Shift + . for recent files.
  • Ctrl + Shift + Q for jumping to any function / class.
  • f e space / p i space for "for loops".
Hille
  • 2,123
  • 22
  • 39
dr. evil
  • 26,944
  • 33
  • 131
  • 201

11 Answers11

14

I recently installed the Xpress version and went on a similar hunt. This cheat-sheet is what I found so far. The XPress version is pretty gimped BTW so I'm trying to get funding for a license.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Rob Allen
  • 17,381
  • 5
  • 52
  • 70
  • keep posting if you got other good resources or tips, just for the records there are bunch of videos in here as well : http://www.devexpress.com/Products/Visual_Studio_Add-in/Coding_Assistance/Training.xml – dr. evil Dec 08 '08 at 22:05
9

I use these a lot:

  • / will comment or uncomment highlighted blocks of code.

  • b will wrap a highlighted selection in braces.

  • Ctrl + 3 will wrap a selection into a region.

  • tc will generate a try/catch block.

  • mbs will write a MessageBox.Show(""); and drop the cursor in the quotes.

  • cws will do the same but with Console.Writeline.

  • m will create a method block (ms would do a method block that returns type string).

  • . will make a comment block.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Echostorm
  • 9,678
  • 8
  • 36
  • 50
  • Didn't know commenting stuff, very cool. – dr. evil Jan 07 '09 at 16:18
  • If you go to DevExpress/Options/Editor/Templates you can see the whole list. I make myself a cheat sheet of like 5 to learn every week or two. – Echostorm Jan 07 '09 at 16:55
  • I would really prefer if they did not have the mbs shortcut. The only reason you would really want that is for debugging which means it will be used and abused by people when there are a million better options available - unit testing, logging, or even Debug.WriteLine("") – George Mauer Feb 24 '10 at 02:20
  • Why / does not work? I have selected text, Shift + '/' - whole text in selection overwritten with '/' – hellboy Sep 25 '13 at 07:28
8

NumPad+Plus widens the scope of your selection one level.

Try it. It's sublime :)

Lernkurve
  • 20,203
  • 28
  • 86
  • 118
moobaa
  • 4,482
  • 1
  • 29
  • 31
7

F2 - Rename

Strictly this is a RefactorPro shortcut as the Rename functionality is for RefactorPro. (However since RefactorPro is included in the Price of CodeRush that should not be an issue)

It is also, I think, Disabled by default.

You should be able to use the DevExpress\Options...\IDE\Shortcuts screen to search for F2 and re-enable it.

Very natural to rename Vars and Methods using F2 when you're already used to F2 functionality for Files and Folders in Explorer.

Igor Kustov
  • 3,228
  • 2
  • 34
  • 31
Rory Becker
  • 15,551
  • 16
  • 69
  • 94
6

Search for Type

QuickNav (Ctrl+Shift+Q) can be a bit excessive at times....

If you know you're looking for a Type, bind Ctrl+T to QuickNav using additional params of "AllTypes,, AllVisibilities, CurrentSolution" (without quotes)

This will allow you to search for only Types in the current solution

These params can be tweaked to your liking. See http://community.devexpress.com/forums/p/66380/225556.aspx#225556 for details

Igor Kustov
  • 3,228
  • 2
  • 34
  • 31
Rory Becker
  • 15,551
  • 16
  • 69
  • 94
  • +1 Nice one. FWIW Ctrl-T normally swaps the char to the left of the caret with the one to the right (i.e., A|B becomes B|A). See http://www.dofactory.com/ShortCutKeys/ShortCutKeys.aspx (So I usedl Alt-1 based on your other tip). – Ruben Bartelink Apr 15 '10 at 09:29
4

rt / rf = For Return True and False

dr. evil
  • 26,944
  • 33
  • 131
  • 201
3

Search for Member

QuickNav (Ctrl+Shift+Q) can be a bit excessive at times....

If you know you're looking for a Method, bind Ctrl+M to QuickNav using additionial params of "AllTypes, AllMembers, AllVisibilities, CurrentFile" (without quotes)

This will allow you to search for only Members in the current file.

These params can be tweaked to your liking. See http://community.devexpress.com/forums/p/66380/225556.aspx#225556 for details

Rory Becker
  • 15,551
  • 16
  • 69
  • 94
  • Did I ever tell that I love you Rory? I set mine to Ctrl+Shift+M but this is great – George Mauer Feb 24 '10 at 02:28
  • Awesome. Careful with Ctrl-M as its the first part of a chord that covers a slew of code collapse stuff in Edit Advanced. Suggest a summary post of your custom hotkeys here or on your blog in order of how useful you think they are to the wider populace. See also http://www.dofactory.com/ShortCutKeys/ShortCutKeys.aspx – Ruben Bartelink Apr 15 '10 at 09:30
3

Here is a simple CodeRush Template for generating guard clauses.

Type inx space within a method, whilst you have a variable reference on the clipboard and you'll get...

If [VariableName] Is nothing Then
    return 
End If 

or

if ([VariableName] == null)
{
    return;
}

... depending on the language you're currently operating in.

This Template is often referred to within DevExpress Webinars as If Not Null or If Null Exit

Rory Becker
  • 15,551
  • 16
  • 69
  • 94
1

Inside VS.NET

Press "Ctrl + Shift + Alt + O" will list all the DX Options (and putting shortcuts in the search box will bring you to the keyboard bindings)

Ruben Bartelink
  • 59,778
  • 26
  • 187
  • 249
devXen
  • 3,013
  • 3
  • 35
  • 44
1

CR_MetricShader: is a free open source plugin for CodeRush or CodeRush Xpress which will allow you to see visually when your method's complexity is getting out of hand.

It alters the background color of your method to indicated severity with respect to your chosen Metric.

Works with the built in metrics of CodeRush (and the hidden ones in CodeRush Xpress) aswell as being compatible with any you might choose to create yourself.

Rory Becker
  • 15,551
  • 16
  • 69
  • 94
1

This is an old post on the DevExpress Coderush Forum:

In it is a setting suggestion by Mark Miller to enhance the default "Embed in Parenthesis" feature of CodeRush.

Once in place ... highlight some text and hit '('. your selection will be wrapped in Parenthesis and more importantly your caret will be on the left of the selection. (Similar applies to the Right Parenthesis)

Ideal for VB.Net users to use alongside CInt, CStr etc

Rory Becker
  • 15,551
  • 16
  • 69
  • 94