My new favorite macro in Visual Studio 2008 is control-D then control-K. Hit that key sequence and voila: all code on the page has been formatted. It’s especially helpful when copy-pasting. Just a tip from Tim to make your life easier!
My new favorite macro in Visual Studio 2008 is control-D then control-K. Hit that key sequence and voila: all code on the page has been formatted. It’s especially helpful when copy-pasting. Just a tip from Tim to make your life easier!
March 7th, 2009 at 9:10 pm
Wrong way around!
Its control-K then control-D.
March 8th, 2009 at 10:06 am
Doh! Thanks for the correction.
March 10th, 2009 at 6:19 pm
Except when VS gives you a very useful message like “The key combination (Ctrl+K, Ctrl+D) is bound to a command (Form&at Document) which is not currently available.”
Good times.
May 12th, 2009 at 2:45 am
Can anybody explain me why i have to use 2 keyboards commands for this?
In other IDEs i was used (since years) to press CTRL-F and format was done
August 7th, 2009 at 6:24 am
For me it’s Ctrl-E, Ctrl-D for Format Document, and Ctrl-E, Ctrl-F for Format Selection. Got to Edit -> Advanced to see what it’s set to.
I think it’s a combination of 2 because there are so many shortcuts now.