Free tools that will automatically reformat all C / C ++ source files in VS2008 on save?

I'm looking for a tool (macro, extension) for Visual Studio 2008 that will reformat the source code (C / C ++) when I save the file.

+2


source to share


2 answers


AStyle was my first hit on Google. Looks reasonable. You can bind this to a keyboard event under External Tools in Visual Studio. (I suspect that writing / writing a small macro that formats and saves the file is straightforward, since it recovers Ctrl-S)



See also fooobar.com/questions/46448 / ... which AStyle recommends as well.

+3


source


Doesn't that mean you can define a "macro" yourself in Visual Studio? If so, you can try to do something like a Ctrl+A -> Ctrl+K Ctrl+F -> Ctrl+S

value select all, reformat, save

and then bind it to yours Ctrl+S

. I'm not sure, but I think it wouldn't be too difficult.



+1


source







All Articles