首页 > 其他 > 详细

Sublime Text3/Text2 Package Control 安装

时间:2014-02-27 01:14:55      阅读:615      评论:0      收藏:0      [点我收藏+]



Package Control 官网:https://sublime.wbond.net/


INSTALLATION

Simple

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

安装

简易方式

最简单的安装方法就是通过Sublime Text 控制台,这个控制台口入口是通过Ctrl+·(esc下面的)快捷键 或者菜单栏的View(查看)>Show Console(显示控制台),一旦打开,粘贴合适的python代码到您当前的sublime text版本的控制台

Package Control 安装代码

SublimeText3


import urllib.request,os,hashlib; h = ‘7183a2d3e96f11eeadd761d777e62404‘ + ‘e330c659d4bb41d3bdf022e94cab3cd0‘; 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://sublime.wbond.net/‘ + 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)


SublimeText2


import urllib2,os,hashlib; h = ‘7183a2d3e96f11eeadd761d777e62404‘ + ‘e330c659d4bb41d3bdf022e94cab3cd0‘; 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://sublime.wbond.net/‘ + 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‘)

?bubuko.com,布布扣

This code creates the Installed Packages folder for you (if necessary), and then downloads the Package Control.sublime-package into it. The download will be done over HTTP instead of HTTPS due to Python standard library limitations, however the file will be validated using SHA-256.

WARNING: Please do not redistribute the install code via another website. It will change with every release. Instead, please link to this page.

这个代码创建安装包文件到您的电脑(如果必要的话),然后下载的 Package Control。sublime-package进去 。由于python标准卡的限制,下载是通过HTTP而非HTTPS。但该文件被使用SHA-256验证


警告:请不要通过其他网站分发的代码安装,代码会随着版本而改变,相反,请连接该网页


英文水平有限,翻译不足之处望指正!!!

?

Sublime Text3/Text2 Package Control 安装,布布扣,bubuko.com

Sublime Text3/Text2 Package Control 安装

原文:http://blog.csdn.net/crper/article/details/19937865

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!