Formatting Styles - More granular control?
I realize my title is very vague.
Basically, I would like more control options over how styles are applied. Maybe I'm just really weird in how I format my SQL, but it seems like no matter how hard I try, I can never get the styles the way I want them.
I realize that it's impossible to make it perfect. But the basic idea is to get the formatter to do what you would normally do the majority of the time.
For example....the majority of the time, I prefer the following...
For JOIN clauses, all join criteria is in the same line:
JOIN dbo.Table t ON t.Foo = x.Foo AND t.Bar = x.Bar
But for WHERE clauses, I prefer them to be on separate lines:
WHERE x.Foo = 1
AND x.Bar = 2
AND y.Baz = 123
Unfortunately, the formatter only allows one or the other.
Another example, is with lists:
For GROUP BY, I like them all on the same line
GROUP BY x.Foo, y.Bar, z.Baz
But for SELECT, I like the columns on separate lines (unless it's a short list, then put them all on the same line.)
Unfortunately, the formatter also does not allow this. So now all of my group by's look like this:
GROUP BY x.Foo
, y.Bar
, z.Baz
I have a few more examples, but they're more oddball things that I like to do that are probably not as common.
-
Jeff Humphreys commented
More control is always desirable, unless it creates clutter which puts off users who don't have the same quirks. The Style page seems to be targeting less control than more, which is a major design decision on their part.
I've used another tool that had what appeared to be high granularity of control, but the way it was done really just repeated the same options per keyword. That actually sounds like what you're talking about. But there must be other paradigms that keep it simple at a high level, and have "Advanced..." on each of these pages. I suspect adding any more checkboxes to each sub page is verboten, trying to prevent spagetti.
There must be a compromise. Perhaps multiple approaches, as in different master formatting pages. One is every single option as a hierarchy, the other is the current simple approach.
The obvious addition of a tab under STATEMENTS or CLAUSES for GROUP BY is probably not going to fly.