Are there any plugins for Visual Studio that will automatically format the code the way I like?

When I open any code file, whether something I wrote or something else from another developer, I want it to automatically format it with my preference for anchor, indentation, line spacing, etc.

Ideally, when saving the file to disk, it will only retain the formatting for the codes / lines that I touched. It still displays the rest of the formatted code, however it will not save them to disk (so as not to confuse other developers).

+2


source to share


2 answers


You can use Resharper for this. It will show warnings for formatting inconsistencies (via colored underscores, as well as warnings for spell checking) and you can instruct you to reformat the selection or the entire file based on the default formatting rules or your own.



Formatting rules are customized according to your coding standards.

+1


source


Visual Assist X works for both C / C ++ and C #. I use it extensively when I wish I needed to do something on Windows :-).

The refactoring tool is awesome. It fixes Visual Studio smart termination. In fact, after using Visual Assist X, Visual Studio's smart shutdown looks like you won't believe you paid so much for such crappy "smartness".



Of course, Visual Assist X also adds some much needed snippets. You can finally stop drooling when you see these "special moves" snippets while watching these Textmate videos.

+1


source







All Articles