Today I was grabbing a list of popular names from the US Census Bureau for some random data generation (writing more on this soon, fun topic for me) and only wanted one column from the four I could copy/paste from the website. I didn’t feel like doing any sort of find/replace with a regular expression to just pull out the column I wanted. Thankfully, I didn’t have to.
When you click and drag inside the Visual Studio IDE, you select text complete with line breaks and tabs; the selection has a jagged edge formed by the varied line lengths. When you hold down Alt, however, your selection becomes a rectangle as you move the mouse; the content you’re moving over doesn’t define the boundaries of the selection, only the mouse movement. With this I just hold Alt and select all the columns I don’t want, and hit delete. See the before and after pics below.


It’s not rocket science, but knowing this little shortcut can make a nice difference is specific situations. This also works with find/replace, by the way, allowing you to replace inside a more refined selection. Sadly, you can’t paste replacement text into such a selection and expect it to work right. But hey, 2 out of 3 aint bad.
Del.icio.us
digg
FURL
reddit
Technorati
Ma.gnolia
Stumble Upon
Bloglines