Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to install PackageControl with SublimeText

Shulou Source: shulou.com Published: 2022-06-02 05:43:00 12月02日 Update

This article mainly introduces "how to install PackageControl with SublimeText". In daily operation, I believe many people have doubts about how to install PackageControl with SublimeText. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how to install PackageControl with SublimeText". Next, please follow the editor to study!

1. Download the Sublime installation from the official website

2. Open Sublime and press ctrl+ `or click View > Show Console on the menu bar.

3. Paste the following Python code in the input box according to the sublime version and enter:

Sublime2:

Import urllib2,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + 8bc59f460fa1548d1514676163dafc88; 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 (); by = urllib2.urlopen ('http://packagecontrol.io/' + pf.replace ('','% 20')). Read (); dh = hashlib.sha256 (by). Hexdigest () Open (os.path.join (ipp, pf), 'wb') .write (by) if dh = = h else None; print (' Error validating download (got% s instead of% s), please try manual install'% (dh, h) if dh! = h else 'Please restart Sublime Text to finish installation')

Sublime3:

Import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + 8bc59f460fa1548d1514676163dafc88; 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)

4. Restart Sublime, press ctrl+shift+P under win, press command+shift+P under mac, and enter the interface that pops up.

Install package

You can see the following

Package Control: Install Package

That is, the installation is successful.

At this point, the study on "how to install PackageControl with SublimeText" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Learning more help input utility success next code content keyboard shortcuts articles methods versions theories interfaces knowledge articles websites menus materials Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology MySQL vpn Redmi Shulou Information