下載下來啥也沒有,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就可以
Paste_Image.png
然后安裝插件 command + shift + p(或者ctrl+shift+p) 出來一個面板 輸入 install 進入第一個選項,
Paste_Image.png
然后輸入插件名稱,比如emmet.
Paste_Image.png
如果沒反應,需要刪除packageControl 重新安裝
Paste_Image.png
Paste_Image.png
重新安裝好了就繼續(xù)install 輸入插件名 選擇
下載插件時候如果報錯 Sublime Text Error while loading PyV8 binary:exit code 1 Try to manually install Pyv8 form https://github.com/emetio/pyv8-binaries
需要下載資源(自行對應系統(tǒng)版本)
Paste_Image.png
下載下來解壓到指定文件夾
Paste_Image.png
剛才試了居然還是報錯 結(jié)果是路徑錯了
Paste_Image.png
Paste_Image.png
參考文章
https://packagecontrol.io/installation#st2
http://www.reibang.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