Visual Studio 2010 Feature I Like: Box Selection

by Andrew Barber 26. April 2010 00:36

Previous Visual Studio versions had the ability to make a box selection in text editors by holding the ALT key down while selecting with the mouse. More than once, I used this to select a column full of "public" modifiers on member variables, hoping that I could paste or type something which would replace what I'd selected on the whole column. Alas; it was not so! As a result, I generally never used block selection.

However, Visual Studio 2010 now does what I'd always hoped it would! From "What's New in the Visual Studio 2010 Editor (link)":

Box Selection

In previous releases of Visual Studio, you could select a rectangular region of text by holding down the Alt key while selecting a region with the mouse. You could then copy or delete the selected text. VS 2010 adds the following new capabilities to the box selection feature:

  • Text insertion: Type into a box selection to insert the new text on every selected line.

  • Paste: Paste the contents of one box selection into another.

  • Zero-length boxes: Make a vertical selection zero characters wide to create a multi-line insertion point for new or copied text.

You can use these capabilities to rapidly operate on groups of statements, such as changing access modifiers, setting fields, or adding comments. For more information, see How to: Select and Change Text.

All I can say is; Woo hoo! Okay; so very small things entertain me.

Tags:

Software Development

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



Links/Profile

Andrew Barber's Profiles:

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010 AndrewBarber.com