Skip to main content
A newer version of this page is available. .

Selection Expand/Reduce

CodeRush provides the Selection Expand and Selection Reduce features. These features allow you to expand/reduce the selected text by logical code blocks.

Use the Selection Expand (Ctrl + W) command to select the code block when the caret is inside it. You can use the Selection Expand command multiple times to increase the selected box's size.

The Selection Reduce (Ctrl + Shift + W) does the opposite: it undoes Selection Expand and reduces the selected block.

ExpandReduceSel

Enable Extra Shortcuts for Selection Expand/Reduce

You can also use NumPad Plus to expand and NumPad Minus to reduce the selection box's size.

Num

Use one of the following ways to enable these shortcuts:

  • Refer to the IDE | Shortcuts options page, open the Selection | Defining group and check the Enabled checkbox for each shortcut.

ExpandReduceSel

  • Use the Setup Wizard page. Choose CodeRush | Setup Wizard... menu item to invoke this page. Enable the Add Numeric Keypad Bindings option on the Numeric Keypad Bindings page.

Nav

NOTE

You can use the Selection Expand/Reduce feature in combination with the Include Previous/Next Element feature.