Home > Article > Development Tools > sublime text3 formatted json and formatted sql code
The following tutorial column will introduce you to the sublime text3 formatting json and formatting sql code methods. I hope it will be helpful to friends in need!
1. Format json textStep 1: Use View->show console (Chinese is: View- >Show/hide console) or (Ctrl `) shortcut key to open the console,
Copy the following code, and press Enter, then restart sublime——For details, see: https: //packagecontrol.io/installation#st3import urllib.request,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' 'ebe013ee18cced0ef93d5f746d80ef60'; pf = 'Package Control.sublime-package'; ipp = sublime .installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' pf.replace(' ', ' ')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h )) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
Step 2: Installation
pretty jsonPlug-inMethod 1: Click Preferences->Package Control-> enter install package, press Enter->Wait for a while, enter Pretty json in the box that appears , press Enter to install Method 2: shortcut key ctrl shift p, then the same: enter install package, press Enter -> Wait for a while, enter Pretty json in the box that appears, press Enter, That is to install
The third step: shortcut key ctrl alt j to format json text
2. Format sql codeSame as above, install
SqlBeautifierPlug-in
Then: first ctrl k, then ctrl f to format
The above is the detailed content of sublime text3 formatted json and formatted sql code. For more information, please follow other related articles on the PHP Chinese website!