SqlBeautifier
SqlBeautifier copied to clipboard
bug with "indent_tabs": true
Using these settings:
{ "indent_tabs": true, "indent_width": 1, "reindent": true }
The SQL code gets this nice format:
SELECT foo,
bar AS BAR
FROM TABLE
WHERE stuff = stuff2
AND other_stuff NOT IN ('TH',
'AN',
'KS')
AND blah = bleh
But I want to use tabs instead of spaces, so now with plugin settings:
{ "indent_tabs": true, "indent_width": 1, "reindent": true }
The code gets formatted to (had to use an image):
I guess the problem is that the number of tabs used is the same number of the calculated spaces, is there any way to read the user's customized tab size to do the math? Congratulations for the great plugin.
@pedrogazzola , I have the same issue. With these settings:
{"indent_tabs": false, "indent_width": 4}
code gets by a wrong number of spaces.
Example:
select f.id, f.name, b.login
from foo f,bar b
where 1=1 and f.id=b.id;
...becomes (dots=spaces)
select f.id,
.......f.name,
.......b.login
from foo f,
.....bar b
where 1=1
....and f.id=b.id;
Did you solve somehow? Thanks.