下載
安裝插件 Package Control
代碼安裝
使用快捷鍵
Ctrl + `
或打開(kāi)菜單View
->Show Console
打開(kāi)控制臺(tái)笼吟,輸入以下代碼,回車
- Sublime Text 2
import urllib2,os; 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( ))); open( os.path.join( ipp, pf), 'wb' ).write( urllib2.urlopen( '[http://sublime.wbond.net/](http://sublime.wbond.net/)' +pf.replace( ' ','%20' )).read()); print( 'Please restart Sublime Text to finish installation')
- Sublime Text 3
import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( '[http://sublime.wbond.net/](http://sublime.wbond.net/)' + pf.replace(' ','%20')).read()); print( 'Please restart Sublime Text to finish installation')
手動(dòng)安裝
- 打開(kāi)菜單
Preferences
->Browse Packages
啸如,打開(kāi)上級(jí)目錄,再打開(kāi)Installed Packages
目錄 - 下載 Package Control.sublime-package,并復(fù)制到
Installed Packages
目錄下
使用
安裝后争拐,重啟搀罢,使用快捷鍵command + shift + P
蝗岖,輸入install
,選擇Install Package
并回車榔至,打開(kāi)新窗口抵赢,輸入插件關(guān)鍵字進(jìn)行搜索
常用插件
常見(jiàn)問(wèn)題
- There are no packages available for installation
安裝好Package Control
之后,選擇Install Package
時(shí)唧取,提示There are no packages available for installation
Log提示下載 channel_v3.json 失敗解決方法:
- 從瀏覽器下載該json文件
- 將該文件拷貝到
Contents
->MacOS
目錄下 - 修改配置文件
Preferences
->Package Settings
->Package Control
->Settings-User
铅鲤,添加配置
"channels": [ "channel_v3.json" ]