Visual Studio: Box Selection

Posted Sun, Apr 4 2010 19:52 by Deborah Kurata

I have been using Visual Studio for a long time, so I am always excited when I find out something about Visual Studio that I did not know. I'm not sure when it appeared (could it have been in Visual Studio 2002?), but I found it today: Box Selection.

Simply hold down the Alt key to select a rectangular box of text in the text editor instead of selecting lines.

Say, for example you have these two lines of code:

In C#:

image

You want to copy the comments to paste elsewhere. Just hold down the Alt key and select the text shown in green.

image

In VB:

image

You want to copy the comments to paste elsewhere. Just hold down the Alt key and select the text shown in green.

image

The text shown in yellow in both examples is your "box selection". You can then copy or paste it or even delete it.

Use this technique any time you want to copy, delete, or replace a block of text.

Enjoy!

Filed under: , , , ,

Comments

# Box Selection and Stored Procedures

Sunday, April 04, 2010 10:36 PM by Deborah's Developer MindScape

When I found out what box selection can do (as described in this earlier post ), my first thought was

# VS 2010: Box Selection Updates

Sunday, April 04, 2010 10:56 PM by Deborah's Developer MindScape

Box selection has been extended in Visual Studio 2010 to include text insertion. (If you are not familiar

Leave a Comment

(required) 
(required) 
(optional)
(required) 
If you can't read this number refresh your screen
Enter the numbers above: