How to install and use Package Control in Sublime text 2/3, sublimepackage

Source: Internet
Author: User

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:

  1. 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:

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

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.