Are there any plugins for Visual Studio which auto

2019-07-19 04:04发布

When I open any code file, whether something i've written or something from another developer, I want it to automatically format it with my preference of bracing, indentation, line spacing, etc..

Ideally, when saving a file to disk, it would only save the formatting for code/lines i've touched. It would still display the rest of the code formatted, however it would not save these to disk (so as to not piss off other developers).

2条回答
Lonely孤独者°
2楼-- · 2019-07-19 04:37

You could use Resharper for this. It will show warnings for formatting inconsistencies (via colored underscores, much like warnings for spellcheckers), and you could instruct it to reformat a selection or a whole file based on either the default formatting rules or your own.

Formatting rules are customizable to fit your own coding standards.

查看更多
SAY GOODBYE
3楼-- · 2019-07-19 04:56

Visual Assist X works for both C/C++ and C#. I use it extensively whenever I have the unfortunate needs to do things in Windows :-).

The refactoring tool is awesome. It fixes Visual Studio smart completion. In fact, after you use Visual Assist X, Visual Studio smart completion looks so dump that you won't believe you paid so much for such crappy "smartness".

Of course, Visual Assist X also adds the much needed snippets. You can finally stop drooling when you see those snippet "special moves" when viewing those Textmate screencasts.

查看更多
登录 后发表回答