sublime text3 JSON format, formatting codes sql

1. Format json text

The first step : Use View-> show console (in Chinese: View -> Show / Hide Console) or (Ctrl + `) shortcut key to open the console, copy the following code , and press Enter after the restart Sublime - See in particular : https://packagecontrol.io/installation#st3

import 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(' ', '%20')).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 two : Install pretty json plugin

Method 1: Click Preferences -> Package Control-> Enter the install package, Enter -> Wait a minute, enter Pretty json in the box that appears, enter, namely installation

Method two: shortcut ctrl + shift + p, then the same: an input install package, the transport -> later on, in input box that appears Pretty json, carriage return, i.e. install

The third step : the shortcut key ctrl + alt + j json format text

2. Format Code sql

Ibid, installation  SqlBeautifier plug

Then: First ctrl + k, then formatted ctrl + f

 

reference:

https://segmentfault.com/a/1190000006011018

https://blog.csdn.net/u010412719/article/details/77435104

https://www.jianshu.com/p/b83ad949c85f

Guess you like

Origin www.cnblogs.com/qi-yuan-008/p/12125374.html