TAGS :Viewed: 16 - Published at: a few seconds ago

[ Keep code always formatted properly? ]

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.

Answer 1


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).

Answer 2


See Uncrustify and Artistic Style and also Universal Indent GUI

Answer 3


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.