Monday, April 19, 2010

My CodeRush Shortcuts

After being asked to provide a post detailing on the additional shortcuts I configure for CodeRush after installation, I came up with the following.

I’ll try to keep this post up to date as I find

  • F2 – Refactor(Rename)
  • Alt+` - CodeRushTrainingWindowToggle
  • Alt+1 - Refactor
  • Alt+2 – Navigate
    • I disable some Navigations (DevExpress\Options ... Editor\Navigation\Catalog) which I personally never use via this Navigate menu:
      • [First/Last/Prev/Next] Enum Element
      • [First/Last/Prev/Next] Member
      • [First/Last/Prev/Next] Statement
      • Parent
      • Parent Member
      • Parent Type
      • [Next / Previous] Reference
  • Alt+Q - QuickNav
  • Ctrl+M – QuickNav(AllTypes, AllMembers, AllVisibilities, CurrentSolution) Explanation
  • Ctrl+T – QuickNav(AllTypes,, AllVisibilities, CurrentSolution) - Explanation
  • Alt+Up - MoveCodeUp [requires DX_MoveCode] **
  • Alt+Down - MoveCodeDown [requires DX_MoveCode] **
  • Alt+Left - MoveCodeLeft [requires DX_MoveCode] **
  • Alt+Right – MoveCodeRight [requires DX_MoveCode] **
  • F12 – NavigateToDefinition [requires CR_NavigateToDefinition]

In cases where indicated shortcut involves brackets, the content of the brackets is to be placed in the parameters box rather than in the command box.

** Note: I have, as yet, not been able to find a better set of keys that this. I realise that these keys are used by other CodeRush functionality. Therefore I recommend placing these bindings in a folder of their own and disabling this folder. You can then switch between the CodeRush set of functionality and that provided by the DX_MoveCode plugin.

It is my intention to develop a plugin to allow me to toggle between these 2 sets of functionality by enabling and disabling these folders on the fly. A keyboard scheme switcher or sorts. :)


Ruben said...

Thanks for posting this (I assume it was my prod).

I did comment on this Post but it got lost (I assume browsers fault) and have only got around to commenting not but...

Thanks very much for sharing and I 100% agree except for:

I love Num Keypad Ins as refactor key (Mark Miller has it in some video and it works well)

I use Alt1& Alt2 for your Ctrl-M and Ctrl-T as both of them have meanings in vanilla VS (CtrlM esp in the C# binddings)

For MoveCode stuff, the keybindings in the comments at are just better as they are the same as another product (Word outlining) and clash with less existing stuff. I really think you should try switching Word to Outlining mode right now and seeing that it works very well and then using it yourself. There are one or two clashes with CamelCaseLeft and CamelCaseRight which also use CtrlAlt Left & Right but I think that should be just a matter of restrictihng those bindings to "when something selected"

(On an sad note, I have stopped using DX_MoveCode as I can no longer take the fact that it gobbles the blank lines between methods and blocks and takes me out of my flow wile I put them back in, GRRing as I busywork. I do love what it could be but simply cant even log bugs on it until this fundamental shortcoming is addressed, sorry!)

Anonymous said...

Nice post. Found this looking for a shortcut I forgot. Reminded me to make a backup of my current custom shortcuts. Also the below plug in was not available when I followed the link :(
F12 – NavigateToDefinition [requires CR_NavigateToDefinition]