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