Reputation: 17197
I am so used to code like this:
if (...)
{
//somecode
}
that I simply have to change the following to the above:
if (...){
//somecode
}
I get a lot of code from other people that I have to go through and sometimes this is what I get. Is it possible to auto-format that in Visual Studio 2008 for C++?
Now some may think I should get used to it. Believe me, I am trying, but it is very distracting and I hope there is a simple solution.
Upvotes: 2
Views: 1848
Reputation: 177461
VS2008 has a simple formatter (Edit menu, Advanced, Format Selection), but it doesn't move braces.
Check out astyle and its --style=ansi
flag.
Upvotes: 5