Sublime text two/3 How to install and use the package Control

Source: Internet
Author: User
Sublime How to install and use the package Control in text 2/3

The package Control plug-in is a handy plugin for Sublime text management plug-ins, but because Sublime text 3 updates the Python function, the API is different, resulting in many Python-based plugins that do not work, package Con Trol The original installation method is invalid.

Simple installation Method:

From the menu View-show console or CTRL + ~ shortcut keys, bring up the console. Paste the following Python code in and enter to perform the installation without exception. The installation code for ST3 and ST2 is provided below:

Sublime Text 3:

  1. ImportUrllib.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.. Joinipp, Pf ). (urllib. Request. Urlopen ( ' http://sublime.wbond.net/' Span class= "pun" >+ Pf. ", '%20 ' read ())

Sublime Text 2:

  1. ImportUrllib2,Os;Pf=' Package Control.sublime-package ';Ipp=Sublime.Installed_packages_path();Os.Makedirs(Ipp) If NotOs.Path.Exists(Ipp) Else None;Urllib2.Install_opener(Urllib2.Build_opener(Urllib2.Proxyhandler( )));Open(Os.Path.Join(Ipp,Pf ). ( Urllib2. Urlopen ( ' http://sublime.wbond.net/' Span class= "pun" >+pf. ", read ()); print ( "please restart Sublime Text to finish installation ' )

Manual Installation:

You may not be able to use code installation for a variety of reasons, and you can manually install the package Control by using the following steps:

1. Click Preferences > Browse Packages menu

2. Go to the upper-level directory of the Open directory before entering the installed packages/directory

3. Download the package control.sublime-package and copy it to the installed packages/directory

4. Restart Sublime Text.

Package Control Master File download address: Https://github.com/wbond/sublime_package_control

How to use:

Shortcut key ctrl+shift+p (menu –tools–command paletter), enter install Select Install package and enter, input or select the plug-in you need to install (note the small text changes in the lower left corner, will prompt installation success).

Reference:

Https://sublime.wbond.net/installation#st3

  • 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.