How to install and use Package Control in Sublime text 2/3, sublimepackage
The Package Control plug-in is a plug-in that facilitates Sublime text management. However, because Sublime Text 3 updates Python functions and the APIs are different, many plug-ins developed based on Python cannot work, the original installation method of Package Control is invalid.
Simple installation method:
From the menu View-Show Console or ctrl + ~ Shortcut Key to call up the console. Paste the following Python code and enter it for execution. The installation is complete without accident. The installation code for ST3 and ST2 is as follows:
Sublime Text 3:
- 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 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 ('Please restart Sublime Text to finish installation ')
Manual installation:
You may not be able to install Package by using code for various reasons. Follow these steps to manually install Package Control:
1. Click the Preferences> Browse Packages menu.
2. Go to the upper directory of the opened directory, and then enter the Installed Packages/directory.
3. Download Package Control. sublime-package and copy it to the Installed Packages/directory.
4. Restart Sublime Text.
Package Control main file: https://github.com/wbond/sublime_package_control
Usage:
Press Ctrl + Shift + P (menu-Tools-Command Paletter), enter install, select Install Package, and press Enter, enter or select the plug-in you need and press enter to install the plug-in. (pay attention to the small text changes in the lower left corner, and the installation will be successful ).
Refer:
Https://sublime.wbond.net/installation#st3