最新sublime text安装package control
来源:互联网 发布:fanuc编程 编辑:程序博客网 时间:2024/06/06 09:46
最新sublime text安装package control
转载http://blog.csdn.net/DeMonliuhui/article/details/77990266
目录(?)[-]
- 官方文档
- sublime text 3
- sublime text 2
- 手动安装
官方文档
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)
- 1
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')
- 1
手动安装
- 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. 重启
阅读全文