How to install the sublime Tex 3t plugin:
- Press the shortcut key CTRL + ~ To bring up the console
- Paste the following code into the console and enter:
- 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 ())
- Restart Sublime Text 3.
- If you see the package control item in Perferences->package settings, the installation succeeds.
By the way, paste the code for sublime Text 2:
Import Urllib2,os; Pf= ' Package control.sublime-package '; IPP = Sublime.installed_packages_path (); Os.makedirs (IPP) if not os.path.exists (IPP) else None; Urllib2.install_opener (Urllib2.build_opener (urllib2. Proxyhandler ())); Open (Os.path.join (IPP, PF), ' WB '). Write (Urllib2.urlopen (' http://sublime.wbond.net/' +pf.replace (', '%20 '). Read () ); Print (' Restart Sublime Text to finish installation ')
To install a plugin using the package control method:
- Press the shortcut key CTRL + Shift + P to bring up the control Panel.
- Enter "Install" in the Control Panel, select "Package Control:install" and enter, and then select the plug-in you want to install in the list.
The uncomfortable is that some network environment may not allow access to unfamiliar network environment to set up a firewall, and sublime Text 2 seemingly unable to set up the proxy, may not get the list of installation packages.
Ok, the method is finished, here is the topic, some useful sublime Text 2 plugin:
1. GBK Encoding Support
For gb2312, Sublime Text 2 itself is not supported, we can ctrl+shift+p call the command panel or perferences->package Control, enter install to call the install Package option and enter in the "GBK Encoding support" option to start the installation, the lower left corner of the status bar is prompted to install successfully. At this time to open GBK encoded files will not appear garbled, if you need to turn into utf-8 can be FILE-GBK to utf8-choose Save with UTF8 on OK.
2, Emmet
This is a quick plugin for writing html/css, read the Zen Coding: A quick way to write html/css code.
To use: Ctrl + Shift + ENTER, and then enter Emmet-style HTML.
3. JQuery
If you're inseparable from jquery, this is a must.
A series of jquery methods (not methods of jquery objects) appear after you enter jquery in the page.
4, Alignment
Code alignment, such as writing a few variables, check these lines, Ctrl+alt+a, wow, qi.
Sublime Text 3 Plug-in installation method