您的位置:首页 > 其它

最新sublime text安装package control

2017-09-15 12:17 357 查看

官方文档

https://packagecontrol.io/installation#st3

通过 ctrl+` 快捷键或者 View > Show Console菜单打开控制台,复制粘贴回车如下代码即可。

sublime text 3

import urllib.request,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60'; 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.path.join( ipp, pf), 'wb' ).write(by)


sublime text 2

import urllib2,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60'; 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 restart Sublime Text to finish installation')


手动安装

Click the Preferences > Browse Packages… menu

Browse up a folder and then into the Installed Packages folder

Download Package Control.sublime-package and copy it into the Installed Packages directory

Restart Sublime Text

译文:

1. 点击菜单中Preferences > Browse Packages

2. 浏览文件夹,然后进入Installed Packages文件夹

3. 下载Package Control.sublime-package ,然后复制到 Installed Packages目录中

4. 重启
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: