Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement Request #2 #7

Open
allbetsareoff29 opened this issue Dec 3, 2014 · 0 comments
Open

Enhancement Request #2 #7

allbetsareoff29 opened this issue Dec 3, 2014 · 0 comments

Comments

@allbetsareoff29
Copy link

Just as previous guy mentioned, great plugin. Thanks for your hard work.
One enhancement request that I have is:
It would be nice to have a setting/option to pick which key words are to not be followed by anything (other than newline).

Note: xxxx replaces spaces (you can't use spaces or tabs in here for some strange reason

Current way:
SELECT A.COL1 AS COL1,
xxxxxxxxA.COL2 AS COL2,
xxxxxxxxB.COL3 AS COL3
FROM APPLES A
INNER JOIN BANANAS B ON A.SOLDTO=B.SOLDTO
WHERE A.SOLDTO = "Peter"

proposed setting/option:
"newLineAfterKeywords": [SELECT,FROM,WHERE]

New formatting:
SELECT
xxxxxxxA.COL1 AS COL1,
xxxxxxxA.COL2 AS COL2,
xxxxxxxB.COL3 AS COL3
FROM
xxxxxxxAPPLES A
INNER JOIN BANANAS B ON A.SOLDTO=B.SOLDTO
WHERE
xxxxxxxA.SOLDTO = "Peter"

bonus points given if you can format the FROM section as following:
FROM
xxxxxxxxxxxxxxxxxAPPLES A
INNER JOINxxxxxBANANAS B ONxxxxxxxxxxxxxxxxxxA.SOLDTO = B.SOLDTO
INNER JOINxxPINEAPPLES P ON A.SOMELONGCOLUMNNAME = P.COLUMN

basically have the table names right aligned and indented so that the "ON" is always in same position. and the same thing for "=" being in the same position

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants