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:
If you instead hold down SHIFT + ALT while dragging the mouse pointer your selection would instead look like this:
Know of another really cool and elegant but not so well known feature in Visual Studio? Please enlighten me in a comment!
PS. For updates about new posts, sites I find useful and the occasional rant you can follow me on Twitter. You are also most welcome to subscribe to the RSS-feed.
This blog is built with EPiServer Community, EPiServer CMS, ASP.NET MVC and a bunch of other great products. The source code is available for download at the projects page, where you also can read more about this site and my other projects.
read more
Comments
Visual C# Kicks 2 years ago
That is very cool indeed. It's also been improved in Visual Studio 2010 so modifying the selection behaves more intuitively.
Leif 2 years ago
There are so many...
Sara Ford, one of the testers on VS2005/VS2008, used to have a Tip of the day on her blog, e.g. "box selection". :-) http://blogs.msdn.com/saraford/archive/2007/07/27/did-you-know-how-to-do-box-selection-in-the-editor.aspx
The "Tip of the day" just returned a few weeks ago for VS2010.
http://blogs.msdn.com/saraford/archive/2010/01/11/visual-studio-2010-tip-of-the-day-returns.aspx
TD 2 years ago
It works with the ALT key only.