SqlBeautifier
A sublime plugin to format SQL. It supports both sublime 2 and 3.
Details
Installs
- Total 154K
- Win 82K
- Mac 53K
- Linux 18K
| Jan 7 | Jan 6 | Jan 5 | Jan 4 | Jan 3 | Jan 2 | Jan 1 | Dec 31 | Dec 30 | Dec 29 | Dec 28 | Dec 27 | Dec 26 | Dec 25 | Dec 24 | Dec 23 | Dec 22 | Dec 21 | Dec 20 | Dec 19 | Dec 18 | Dec 17 | Dec 16 | Dec 15 | Dec 14 | Dec 13 | Dec 12 | Dec 11 | Dec 10 | Dec 9 | Dec 8 | Dec 7 | Dec 6 | Dec 5 | Dec 4 | Dec 3 | Dec 2 | Dec 1 | Nov 30 | Nov 29 | Nov 28 | Nov 27 | Nov 26 | Nov 25 | Nov 24 | Nov 23 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 5 | 2 | 15 | 5 | 6 | 2 | 0 | 2 | 5 | 6 | 1 | 3 | 5 | 9 | 12 | 7 | 13 | 2 | 0 | 8 | 14 | 9 | 20 | 11 | 2 | 5 | 8 | 12 | 10 | 13 | 12 | 5 | 3 | 16 | 15 | 16 | 15 | 12 | 6 | 3 | 11 | 10 | 15 | 15 | 10 | 3 |
| Mac | 6 | 12 | 9 | 5 | 1 | 4 | 2 | 4 | 13 | 12 | 0 | 0 | 7 | 2 | 6 | 8 | 13 | 2 | 1 | 8 | 15 | 15 | 7 | 13 | 3 | 2 | 6 | 23 | 11 | 9 | 5 | 2 | 2 | 9 | 11 | 12 | 8 | 7 | 0 | 0 | 4 | 6 | 8 | 8 | 19 | 6 |
| Linux | 0 | 1 | 6 | 0 | 1 | 1 | 2 | 3 | 1 | 1 | 0 | 2 | 3 | 1 | 0 | 2 | 1 | 0 | 1 | 1 | 1 | 2 | 1 | 4 | 2 | 0 | 2 | 2 | 1 | 0 | 0 | 0 | 0 | 2 | 3 | 1 | 4 | 1 | 2 | 0 | 2 | 1 | 3 | 3 | 0 | 1 |
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
superkey 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.