[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Collapse]CodeRush
  System Requirements
  Improve Performance
 [Expand]Features by Language
 [Expand]Getting Started
 [Expand]How To
 [Collapse]Coding Assistance
  [Expand]Code Templates
  [Expand]Auto Completion
  [Expand]Clipboard Tools
  [Collapse]Selection Tools
   [Expand]Selection Embedding
    Camel Case Selection
    Multi-Select
    Comment/Uncomment Selection
    Selection Expand/Reduce
    Include Previous/Next Element
    Smart Duplicate Selection
  [Expand]Code Providers
  [Expand]Declare Menu
  [Expand]Typing Helpers
 [Expand]Navigation and Search Tools
 [Expand]Static Code Analysis
 [Expand]Visualization Tools
 [Expand]Code Style Assistance
  Building Assistance
  Debugging Assistance
 [Expand]Refactoring Assistance
 [Expand]Unit Testing Assistance
 [Expand]Decompiling Tools
 [Expand]Configuration Options
 [Expand]Extensibility
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

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.

Expanded 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.

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.

  • 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.

Note

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

Expanded Code Preview

CodeRush shows a code preview in the code editor if a portion of the selected code falls outside the screen boundaries.

To enable this new code preview, go to the Editor | All Languages | Selection options page and enable the "Show code preview hints when selection changes" option.

Is this topic helpful?​​​​​​​