Posts Tagged ‘Coding Helpers’

Working with regions using CodeRush

February 6th, 2011 Comments off

If you heavily use region directives in CSharp, Visual Basic, or C++, the following CodeRush features may help you to make it easier to work with them:

Creating regions:

Read more…

Coding Helpers – Auto Declare

February 4th, 2011 Comments off

Auto Declare allows you to quickly declare a variable (field, local or parameter) based on its type. To apply Auto Declare, type the class name and press the Ctrl+A shortcut. The variable will be declared with an appropriate name, and an action hint will be shown:

CodeRush Auto Declare

Read more…

Coding Helpers – Move to Region

February 3rd, 2011 Comments off

The Move to Region (also known as Member MoverCodeRush feature extends the Member drop down menu with a menu item that allows you to move the active member to a region according to your preference:

CodeRush Member Icons and Move to Region preview

Read more…

Coding Helpers – Toggle Regions Outlining

January 27th, 2011 Comments off

When the editor caret is on the line with a region directive, you can press the Space key to collapse or expand the outline of a region. There are built-in shortcuts for toggling outline expansion, but they are probably more tricky to press and remember, e.g. “Ctrl+M, M” (hold the Control key and press the M key twice in the Visual C# keyboard mapping scheme).

CodeRush Toggle Region Outlining

Read more…

Coding Helpers – Auto Create Region

January 26th, 2011 Comments off

If you prefer your code to be wrapped into region directives (#region … #endregion in CSharp, or #Region … #End Region in Visual Basic), the Auto Create Region feature from CodeRush will help. To create a named region around a method, property or event, press “Ctrl+3” key anywhere inside of an active member. This will execute the “RegionAutoCreateaction, which wraps the active member into region directives. The region name will be the same as member’s name and will wrap all attached elements, such as XML doc comments or attributes as well.

Read more…

Coding Helpers – Scope Cycle

November 11th, 2010 Comments off

The Scope (Visibility) Cycle feature adds the capability to quickly change the visibility modifier of the active member using a single shortcut. In a source code file, if your text caret is anywhere within or on a member (method, function, property, class, etc) definition, you can use the Alt key with the Up and Down arrow keys, to cycle through the legal visibility modifiers:

Read more…

Coding Helpers – Smart Enter

October 12th, 2010 Comments off

Smart Enter is intended to improve the usability of the Enter key while coding in the editor. If the feature is enabled and the Enter key is pressed, it moves the editor text caret to the next code line (starting it with the same amount of white space on the current line and adding a line statement terminator to the end of the current line if it doesn’t exist (.e.g semi-colon in CSharp) or inside of a code block, leaving the characters to the right of the source caret location at their initial position. It is activated if the character to the right of the current caret position is one of the following:

  • ] (closing bracket)
  • ) (closing paren)
  • > (closing angle bracket)
  • ; (semi-colon)

Read more…

CodeRush Selection Reduce

August 16th, 2010 Comments off

This command reduces the selection using the same logical blocks by which it was last increased via the Selection Increase feature. If you accidentally overshoot the block you want to select, you can reduce the selection using NUM- key or CTRL+Shift+W keys.

Products: CodeRush Pro and CodeRush Xpress
Versions: all
VS IDEs: any
Updated: Aug/16/2010
ID: C015