1. Install sublime
There is nothing to say about this step, just go to sublime official website to download and install.
2. Install package control
You can directly take the form of online installation.
Press
ctrl+`
The shortcut key to bring up the console. Note that `is the key above the tab key.
Enter in the console
import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ','%20')).read())
The download and installation will start under normal circumstances.
If the prompt of “unable to download xxx” appears during the installation process, you can use the following methods to solve
In Perferences -> Package Settings -> Package Control -> Settings-User, add the following content
"downloader_precedence":
{
"linux":
[
"curl",
"urllib",
"wget"
],
"osx":
[
"curl",
"urllib"
],
"windows":
[
"wininet"
]
},
Finally, the configuration file becomes
{
"bootstrapped": true,
"downloader_precedence":
{
"linux":
[
"curl",
"urllib",
"wget"
],
"osx":
[
"curl",
"urllib"
],
"windows":
[
"wininet"
]
},
"in_process_packages":
[
],
"installed_packages":
[
"Package Control",
"SqlBeautifier"
]
}
Then you can download it normally.
3. Download the plugin
After the package control download is complete, open it in Perferences -> Package Control, then find install packages, and enter the plug-in you want to install in the pop-up dialog box.
Take the SQL formatting tool SqlBeautifier as an example, enter SqlBeautifier in the dialog box, then download and install it.
On a Mac machine, select the corresponding SQL statement, first press command+K, then command+F to format the SQL.