Reputation: 6353
Is it possible to make visual studio keep the code always formatted properly? I use the format document and selection but it wastes time. Any solutions? Third party tools welcome too.
Upvotes: 3
Views: 144
Reputation: 3340
Ctrl+A followed by Ctrl+K, D
Which are the standard keys (C# profile) for Select All, Format Document. Find it doesn't take much time at all.
Upvotes: 0
Reputation: 158309
I use CodeMaid that formats the document (and performs some other, configurable stuff such as removing extra blank lines and similar) automatically on save. Available for 2005/2008/2010 (I only used it in VS2010).
Upvotes: 3
Reputation: 70204
See Uncrustify and Artistic Style and also Universal Indent GUI
Upvotes: 2