Home  >  Article  >  Backend Development  >  How to install and use Package Control in Sublime text 2/3, sublimepackage_PHP tutorial

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

WBOY
WBOYOriginal
2016-07-13 09:45:101020browse

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

Package Control plug-in is a plug-in that facilitates Sublime text management plug-in, but because Sublime Text 3 has been updated The functions and APIs of Python are different, causing many plug-ins developed based on Python to not work, and the original installation method of Package Control is invalid.

Simple installation method:

From the menu View - Show Console or ctrl ~ shortcut key, bring up the console. Paste the following Python code and enter to execute it. The installation will be completed without incident. The installation code for ST3 and ST2 is provided below:

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( ' ',' ')).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( ' ',' ' )).read()); print( 'Please restart Sublime Text to finish installation')

 

手动安装:

可能由于各种原因,无法使用代码安装,那可以通过以下步骤手动安装Package Control:

1.点击Preferences > Browse Packages菜单

2.进入打开的目录的上层目录,然后再进入Installed Packages/目录

3.下载 Package Control.sublime-package 并复制到Installed Packages/目录

4.重启Sublime Text。

 

Package Control 主文件下载地址:https://github.com/wbond/sublime_package_control

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

 

使用方法:

快捷键 Ctrl Shift P(菜单 – Tools – Command Paletter),输入 install 选中Install Package并回车,输入或选择你需要的插件回车就安装了(注意左下角的小文字变化,会提示安装成功)。

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

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

 

参考:

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

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/1043032.htmlTechArticleSublime text 2/3 中 Package Control 的安装与使用方法,sublimepackage Package Control 插件是一个方便Sublime text 管理插件的插件,但因为Sublime Text 3 更新...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn