CodeRush Selection Increase
Selection Increase is a command for a quick selection of continuous logical code blocks. For example, if the caret is inside an expression, you can quickly expand the selection so it entirely holds the expression. The ability to quickly define a selection around a logical block is useful for refactoring. For example, if you’d like to extract a piece of code into a method or property – the Selection Increase will help you define your code block for extraction very quickly. You can also use it to quickly select code you want to move to another location or select any member and/or type declarations. Just place the caret at the beginning of the declaration you want to select, and press the shortcut. This command is bound to NUM+ key or Ctrl+W key. After increasing a selection, you can reduce it using the Selection Reduce command by pressing the NUM- key.
Increasing the Selection Further
If you want to add more code to the start of the selection (by logical code blocks), you may use the SelectionIncludePreviousElement action (which is not bound to any key by default). This will extend the active point of the selected block to include the start of the preceding language element.
If you want to add more code to the end of the selection (by logical code blocks), you may use the SelectionIncludeNextElement action (which is not bound to any key by default). This will extend the active point of the selected block to include the end of the next language element.
Note: If the caret is inside a white space (e.g., at the absolute beginning of a line), the parenting block that is first selected may be greater than you expect (for example, the first selection might be a method or an entire class rather than a block that starts later on the same line. For best results, place the caret somewhere on a text of the code block you want to select.—– Products: CodeRush Pro and CodeRush Xpress Versions: all VS IDEs: any Updated: Aug/16/2010 ID: C014