views:

112

answers:

3

How to automatically indent source code in visual studio 2010?

I have used Ctrl + K , Ctrl + F, but it does not works, is there any other way/plugin could do this work?

+1  A: 

Ctrl+E, D - Format whole doc
Ctrl+K, Ctrl+F - Format selection

Also available in the menu via Edit|Advanced.

Thomas

Thomas Weller
A: 

Also, there's the handy little "increase indent" and "decrease indent" buttons. If you highlight a block of code and click those buttons the entire block will indent.

Tyler
A: 

In 2010 it is Ctrl+k, Ctrl+dalt text

lazfish