Origin
A few days ago the system just restored, reinstall sublime TEXT2 Install plug-in may be due to the company's network environment problems, a variety of error, the solution is recorded. System environment: Win7 x64 + Sublime Text2.
Package Control
Method One: Online installation, first open Ctrl + ~, enter the following code:
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 ')
Restart the software after the installation is finished.
PS: Enter CTRL + Shift + P and then enter the install package to see if it can be adjusted to verify that the installation is successful.
Method Two: Offline installation, if you need a package control of the installation packages, the installation package to replace the sublime Text2 the relevant path can be, there are two paths, verified to be placed in any of them.
- Path One: Open Sublime Text 2, click Preferences---Browse Packages, go to a folder and return to the top level of the folder "Sublime Text2" to find a "installed Packages" folder (or create a new one without the folder), place the downloaded package control's installer in the "Installed Packages" folder.
- Path Two: Sublime the installation path of text 2, "Sublime text 2\pristine packages\" folder.
Where path one is the official recommended path to prevent, please see here for more information.
Installing plugins
Installing the package control after you install the plugin is simple, enter CTRL + Shift + P and then find the plug-in installation you want to install. But I installed the package control after the start of the control when the error, pop out a box: "There is no packages available for installation" Half a day, I suspect the company's network problems , if you know the Big Brother want to guide under.
Fortunately, I installed sublime text before the various plug-ins have a backup, can not be installed from the package control, then directly unzip the plug-in, and then the extracted folder to a name to click Preferences-----Browse Packages, Enter the folder folder so that the plugin is installed successfully.
When I find the package control error, I found that the author of the package control patiently and earnestly answer each friend put forward the issue, the truth here, helpless English is too poor, not read. But Wbond's patience and seriousness left a deep impression on me.
Sublime Text 2 Two ways to install the package control and plug-in