Making square selections
October 7, 2010 Leave a comment
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.
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.
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.



