Is there a way to specify the indent behavior in the database console?

Is there a way to specify the indent behavior in the database console?

I couldn't find anything of the sort, but figured I'd double check here in case I missed it.

0
3 comments

Does the "Editor | Code Style | SQL > Tabs and Indents" work for you?

Please let us know if you have some specific scenario that you would like to achieve.

0

I was looking more for something where I can define when to indent and apply particular formatting. 

For example, when I type:

SELECT *

And then hit enter, it indents like so:

SELECT *

    FROM...

Where as I prefer:

SELECT *

FROM....

There are a few other situations such as when I have a long list of fields in the "SELECT" clause of a sub-select.  When I type the closing parenthesis of the sub-select, it re-formats the "SELECT" clause so that each field is on it's own line.  

However, I was not aware of the "Editor | Code Style | SQL" section and it seems I can turn off various formatting rules completely.  I suspect if I disable the "Tabs and Indents" section, it will no longer undo my own formatting in these situations.  While being able to customize some of these formatting rules, it might not be worth your development effort since this can just be disabled.  I'm sure there are a ton of permutations to consider and everyone's preferences will be different.

Thanks for the quick response!

0

Actually, after looking around a bit more, it seems this exists in the "Queries" tab.  You guys thought of it all :).

Thanks a bunch!

0

Please sign in to leave a comment.