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

No indent? #12

Open
eleftrik opened this issue Oct 2, 2015 · 2 comments
Open

No indent? #12

eleftrik opened this issue Oct 2, 2015 · 2 comments

Comments

@eleftrik
Copy link

eleftrik commented Oct 2, 2015

Sometimes code doesn't get indented at all.

For example, this valid Sql statement (MySql):

select *
from setup.trans_bases t
join setup.hier_bases_total b on b.azienda=t.azienda
and b.idhier_bases=t.idhier_bases_start
and year(b.fine_validita)=9999
join setup.hier_bases_total b1 on b1.azienda=t.azienda
and b1.idhier_bases=t.idhier_bases_end
and year(b1.fine_validita)=9999
where t.idtrans_anag=7;

..after SQL Beautifier, remains the same.

My user preferences:

{
    "keyword_case": "lower",
    "identifier_case": "lower",
    "strip_comments": false,
    "indent_tabs": false,
    "indent_width": 4,
    "reindent": true
}

Sublime Text 3, build 3083.

Thank you!

@lwrbakro
Copy link

I can confirm, but I think it isnt an actual issue, maybe just an enhancement.

If you use () it gets indented:

SELECT *
FROM setup.trans_bases t
JOIN setup.hier_bases_total b ON (b.azienda=t.azienda
                                  AND b.idhier_bases=t.idhier_bases_start
                                  AND year(b.fine_validita)=9999)
JOIN setup.hier_bases_total b1 ON (b1.azienda=t.azienda
                                   AND b1.idhier_bases=t.idhier_bases_end
                                   AND year(b1.fine_validita)=9999)
WHERE t.idtrans_anag=7;

@renatoargh
Copy link

I have the same settings and it is also not indenting my code too, even adding parenthesis as suggested above will make it work :|

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

No branches or pull requests

3 participants