Curtis White
Curtis White

Reputation: 6353

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.

Upvotes: 3

Views: 144

Answers (3)

David McEwing
David McEwing

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

Fredrik Mörk
Fredrik Mörk

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

Gregory Pakosz
Gregory Pakosz

Reputation: 70204

See Uncrustify and Artistic Style and also Universal Indent GUI

Upvotes: 2

Related Questions