SqlBeautifier
A sublime plugin to format SQL. It supports both sublime 2 and 3.
Details
Installs
- Total 152K
- Win 81K
- Mac 53K
- Linux 18K
Aug 28 | Aug 27 | Aug 26 | Aug 25 | Aug 24 | Aug 23 | Aug 22 | Aug 21 | Aug 20 | Aug 19 | Aug 18 | Aug 17 | Aug 16 | Aug 15 | Aug 14 | Aug 13 | Aug 12 | Aug 11 | Aug 10 | Aug 9 | Aug 8 | Aug 7 | Aug 6 | Aug 5 | Aug 4 | Aug 3 | Aug 2 | Aug 1 | Jul 31 | Jul 30 | Jul 29 | Jul 28 | Jul 27 | Jul 26 | Jul 25 | Jul 24 | Jul 23 | Jul 22 | Jul 21 | Jul 20 | Jul 19 | Jul 18 | Jul 17 | Jul 16 | Jul 15 | Jul 14 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 6 | 15 | 13 | 12 | 2 | 2 | 7 | 7 | 18 | 17 | 13 | 2 | 1 | 11 | 18 | 10 | 16 | 13 | 3 | 3 | 10 | 13 | 18 | 12 | 14 | 3 | 3 | 12 | 8 | 15 | 10 | 11 | 7 | 3 | 11 | 17 | 17 | 13 | 13 | 3 | 3 | 16 | 15 | 13 | 19 | 13 |
Mac | 9 | 12 | 16 | 9 | 1 | 2 | 13 | 21 | 14 | 16 | 6 | 3 | 2 | 10 | 16 | 13 | 13 | 7 | 5 | 2 | 10 | 9 | 19 | 9 | 13 | 3 | 3 | 13 | 12 | 11 | 12 | 5 | 7 | 2 | 13 | 16 | 19 | 9 | 13 | 1 | 2 | 9 | 13 | 12 | 7 | 14 |
Linux | 2 | 3 | 3 | 3 | 0 | 0 | 4 | 3 | 5 | 4 | 4 | 0 | 1 | 2 | 1 | 1 | 1 | 1 | 0 | 0 | 3 | 2 | 1 | 3 | 4 | 1 | 1 | 2 | 2 | 2 | 3 | 2 | 2 | 1 | 2 | 2 | 2 | 2 | 1 | 1 | 0 | 1 | 2 | 3 | 3 | 2 |
Readme
- Source
- raw.githubusercontent.com
SqlBeautifier
This is a SQL formatter plugin using python-sqlparse for both Sublime 2 and 3.
Enjoy!
Installation
Please install Sublime Package Control first. Then inside Package Control: Install Package, type SqlBeautifier and then click to confirm.
Settings
The default key binding for Mac is
{ "keys": ["super+k", "super+f"], "command": "sql_beautifier" }
- Kindly note that the
super
key here is generally replaced byCommand (⌘)
key
The default key binding for Windows / Linux is
{ "keys": ["ctrl+k", "ctrl+f"], "command": "sql_beautifier" }
Options for formatter
To change the options, click through Package Settings -> Sql Beautifier -> Settings User and add the overrided options in JSON like this
{
"indent_tabs": true,
"indent_width": 1
}
This overrides the default option at Package Settings -> Sql Beautifier -> Settings Default.
Here is the list of options the formatter supports:
keyword_case: Changes how keywords are formatted. Allowed values are “upper”, “lower” and “capitalize” and null (leaves case intact).
identifier_case: Changes how identifiers are formatted. Allowed values are “upper”, “lower”, and “capitalize” and null (leaves case intact).
strip_comments: If True comments are removed from the statements.
reindent: If True the indentations of the statements are changed.
indent_tabs: If True tabs instead of spaces are used for indentation.
indent_width: The width of the indentation, defaults to 2.