ProgrammingJanuary 20, 2010

Select columns of text in Visual Studio

Select columns of text in Visual Studio

Last week I learnt a really clever little trick in Visual Studio from Marthin Freij. While it’s a very old feature in Visual Studio it was news to me that you could select columns of text. That is, if you hold down SHIFT + ALT while dragging the mouse pointer over a block of text you wont select the entire rows of text that you have dragged the mouse pointer over but only the text in the area that you dragged over. That is, without holding down SHIFT + ALT you could end up with a selection like this:

NormalTextSelection

If you instead hold down SHIFT + ALT while dragging the mouse pointer your selection would instead look like this:

TextColumnsSelectedInVisualStudio

Know of another really cool and elegant but not so well known feature in Visual Studio? Please enlighten me in a comment!