Sublime Text installation package Control

Source: Internet
Author: User

Website address: https://packagecontrol.io/installation

Installationsimple

The simplest method of installation is through the Sublime Text console. The console is accessed via the ctrl+` shortcut or the View > Show Console menu. Once Open, paste the appropriate Python code for your version of Sublime Text into the console.

Sublime Text 3:

Import Urllib.request,os,hashlib; h = ' df21e130d211cfc94d9b0905775a7c0f ' + ' 1e3d39e33b79698005270310898eea76 '; 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.pat H.join (IPP, PF), ' WB '). Write (by)

Sublime Text 2:

Import Urllib2,os,hashlib; h = ' df21e130d211cfc94d9b0905775a7c0f ' + ' 1e3d39e33b79698005270310898eea76 '; 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 rest Art Sublime Text to finish installation ')

This code creates the installed Packages folder for your (if necessary), and then downloads the package control.sublime -package into it. The download would be do over HTTP instead of HTTPS due to Python standard library limitations, however the file would be Validated using SHA-256.

Manual

If for some reason the console installation instructions does not work for you (such as has a proxy on your network), per form the following steps to manually install the package Control:

    1. Click the Preferences > Browse Packages ... menu
    2. Browse up a folder and then into the installed packages/ folder
    3. Download Package control.sublime-package and copy it into the installed packages/ directory
    4. Restart Sublime Text

Sublime text To install the package Control

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.