I'm trying to "beautify" sql code in codeMirror .
Autoformatting in not supported in codeMirror since v2 (current version is v4)
I've tried to use the old module formatting.js with autoFormatRange function ( the previous question on StackOverflow here). It doesn't seem to work properly with SQL. It makes indentation without any linebreaks
Did anyone figure out how to get this feature working on codeMirror v4 with SQL?
I'm trying to "beautify" sql code in codeMirror .
Autoformatting in not supported in codeMirror since v2 (current version is v4)
I've tried to use the old module formatting.js with autoFormatRange function ( the previous question on StackOverflow here). It doesn't seem to work properly with SQL. It makes indentation without any linebreaks
Did anyone figure out how to get this feature working on codeMirror v4 with SQL?
Share Improve this question edited Aug 8, 2018 at 22:00 JasonMArcher 15k22 gold badges59 silver badges53 bronze badges asked May 19, 2017 at 9:34 BrunoBruno 1531 silver badge9 bronze badges1 Answer
Reset to default 8I've solved the problem using this js auto-formatter : https://github./zeroturnaround/sql-formatter
It does an excellent job at formatting SQL (demo here)