(Auto)-formatting code?

You could also try this one
SQL Complete is a pretty good solution for advanced code formatting