How do install sublime text package control
Step1. Open Console. (開啟控制台)
- Ctrl + ` OR View -> Show Console
Step2. paste the appropriate Python code. (貼上python 程式碼)
sublime text 3:
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)
sublime text 2:
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')
記得按下 Enter。
安裝完畢後,即可使用Ctrl + Shift + P 來安裝套件。
參考資料 (Reference):
- https://sublime.wbond.net/installation#st2 (English)
- http://docs.sublimetext.tw/package-and-plugin/ (中文)
套件:
- Emmet (增加編輯速度)
http://docs.emmet.io/ (Emmet)
http://docs.emmet.io/cheat-sheet/ (使用說明) - ConvertToUTF8 (解決sublime-text對UTF8支援)
https://github.com/seanliang/ConvertToUTF8
沒有留言:
張貼留言