Formatting - at once - all the files in a Visual Studio project

后端 未结 6 1328
小蘑菇
小蘑菇 2020-12-04 15:29

I am interested in formatting all the files in a Visual Studio (ver. 2005) project all at once.

Currently, there is a way to format a single document by doing somet

6条回答
  •  佛祖请我去吃肉
    2020-12-04 16:08

    Tim Abell wrote a macro to do this on his blog:

    Here's a handy macro script for visual studio I knocked together today. It runs "edit, format document" on every document of the listed file types.

    You have to keep an eye on it as it's interactive and does sometimes pop up a message and wait for an answer.

    You can get the vb file at https://github.com/timabell/vs-formatter-macro More info at https://github.com/timabell/vs-formatter-macro/wiki

    The original code is available at the blog post. Note that this is older than the version available on github above.

提交回复
热议问题