下载下来啥也没有,ctrl+`之后出来控制台,输入
import urllib.request,os,hashlib; h = '261dd1222b4693ce6d4f85f9c827ac06' + '6d5ab8ebdd020086947172a8a1356bb6'; 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 2的话输入
import urllib2,os,hashlib; h = '261dd1222b4693ce6d4f85f9c827ac06' + '6d5ab8ebdd020086947172a8a1356bb6'; 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')
重启sublime 点击查看如下有这个packageControl就可以

然后安装插件 command + shift + p(或者ctrl+shift+p) 出来一个面板 输入 install 进入第一个选项,

然后输入插件名称,比如emmet.

如果没反应,需要删除packageControl 重新安装


重新安装好了就继续install 输入插件名 选择
下载插件时候如果报错 Sublime Text Error while loading PyV8 binary:exit code 1 Try to manually install Pyv8 form https://github.com/emetio/pyv8-binaries
需要下载资源(自行对应系统版本)

下载下来解压到指定文件夹

刚才试了居然还是报错 结果是路径错了


参考文章
https://packagecontrol.io/installation#st2
http://www.jianshu.com/p/3cb5c6f2421c/
https://segmentfault.com/q/1010000004550158
https://github.com/emmetio/pyv8-binaries#readme
http://www.cnblogs.com/BinBinGo/p/4860495.html
http://www.voidcn.com/blog/yanzi1225627/article/p-5762653.html
网友评论