之前在自己的文章《Linux下安裝以及破解sublim-text-2編輯器》的文章中提到過關於sublime-text-2的Package Control組件安裝方法。
當時使用的是粘貼代碼:
import urllib2,os;pf='Package Control.sublime-package';ipp=sublime.installed_packages_path();os.makedirs(ipp) if not os.path.exists(ipp) else None;open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read())
但是有時候粘貼代碼會出現問題,那么這個時候我們就需要手動安裝了
過程如下:
- Click the Preferences > Browse Packages… menu entry
- 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
參考資料:
http://wbond.net/sublime_packages/package_control/installation