Making square selections

In visual Studio 2008, you had the possibility of selecting columns of data, which I call square selections (a.k.a box selection, column selection, etc), as opposed to full row selection as seen in the following image.

Normal text selection

Normal text selection

Square Text Selection

Square Text Selection

Unfortunately, this was of limited usage since you were not able to replace text by typing once you’ve made your selection. Visual Studio 2010 opens up new possibilities.

What has really changed in Visual Studio 2010 is that after making a square selection, you can replace the selected text simultaneously on all selected rows, whether it be by typing or by pasting previously selected text. If you are going to paste text into the selection, make sure that you have the same number of lines in the clipboard or the pasted text will overflow to lines below the selection.

Multiline typing

Multiline typing

Pasting a square select text
1. Copy text to the clipboard by first selecting the text by holding down the ALT key and then making a selection using the mouse.
2. Press Ctrl+C to copy the text to the clipboard.
3. Make a new selection where you wish to copy the text.
4. Press Ctrl+V to paste the text.

I’ve purposely copied one too many lines (3 lines of “public” in the following image) and copied it to the block of two lines above. You can see that an extra line of with only public was pasted.

Pasting Square Selection of Text

Pasting Square Selection of Text

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: