sublime is a lightweight editor with powerful functions and easy to install plug-ins. However, as a newbie, I don’t know how to install plug-ins at first. The following is a tutorial on using sublime The column summarizes two methods for you:
1. Install through package control.
Newly installed sublime does not have this option. Follow the steps below to install the package control tool.
1. Take sublime text3 as an example. Open the editor, Ctrl ` (the key to the left of 1) to bring up the command line, and paste the following code:
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())
sublime text2
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( 'Please restart Sublime Text to finish installation')
Press Enter and restart the editor.
2. Open package control (shortcut key Ctrl shift p)
Input install Package and select install Package
Then enter the plug-in to be installed and you can install it.
2. Directly download the plug-in package
Download the package package and copy it directly to the package.
The above is the detailed content of How to install plug-ins in sublime. For more information, please follow other related articles on the PHP Chinese website!