352 Inc. / Digital Marketing / March 22nd, 2008

Alt + Visual Studio

You learn something new every day, but it’s not every day you learn something really useful. Alt in Visual Studio has to be one of the most useful text editing shortcuts I have come across since copy and paste (kudos to Mr. Evol). Alt allows you to select vertical regions of text, the usefulness of which I demonstrate below.
Say you would like to add the namespace using statements to a string builder within a new class, say Class1.

There are three namespaces so you can quickly create the three append lines.

Now one could copy each namespace individually, or, just select them all with Alt.

Copy that block and paste it into the first append to get

This demo’s code is of course useless, but the technique is invaluable.