Visual Studio 2005 Tip #4: Column Selecting Text

There are times when you need to select text in column mode instead of the tradtional row selection. Think of it like selecting a range of columns and rows in Excel.

For example, lets say I want to highlight all the strings from this section of constants because you want to put into a store procedure as input parameters.
The image “http://static.flickr.com/21/98461267_8d67f24660.jpg?v=0” cannot be displayed, because it contains errors.

Move the cursor to the beginning column you want to start highlighting from. Hold down the ALT key and then press and hold down the left mouse button. Then Highlight the code you want with the mouse or arrow keys. Once you have the code you need, simply copy ( + C), cut ( + X), paste ( + V) or delete.
The image “http://static.flickr.com/32/98461269_a31ccc6621.jpg?v=0” cannot be displayed, because it contains errors.
Now the clipboard has stored only the text that is highlighted above. The only thing now is remove the quotes and the semi-colons in when posting it in your stored procedure!

ALT + Left Mouse button = Column Text Selection

This feature also works in Visual Studio 2003. (It may work in 2001 but I have not used it in several years to remember)

technorati tags: ,

4 comments ↓

#1 Hulkster on 03.28.06 at 7:55 pm

Visual Studio 2005 Tips #3: Using Surround with … Timesaver!…

 
Visual Studio 2005 Tips #3: Using Surround with … - Another real nice feature that will……

#2 dotnetkicks.com on 04.01.06 at 8:49 pm

HOW TO: Do Column Text Selection in Visual Studio 2003/2005…

Trackback from dotnetkicks.com…

#3 Sotto on 08.14.07 at 10:48 pm

Hi,

do you know of a way to paste text in columnmode?

For example, you copy some text from the web and want it included in a classes’ XML comments.
If you paste between
///
/// the /// aren’t put before every line that’s being pasted.
So it’d be great to be able to select in columnmode and paste /// in front of each line.

#4 Niels Hansen on 08.16.07 at 9:24 pm

That would be cool and its something that I’ve want to be able to do as well. Maybe this is possible and someone will answer it here!

Leave a Comment