代码改变世界

关于sublime-text-2的Package Control组件安装方法,自动和手动

2012-07-25 09:07  Rollen Holt  阅读(5641)  评论(0编辑  收藏  举报

之前在自己的文章《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())

  但是有时候粘贴代码会出现问题,那么这个时候我们就需要手动安装了

过程如下:

  1. Click the Preferences > Browse Packages… menu entry
  2. Browse up a folder and then into the Installed Packages folder
  3. Download Package Control.sublime-package and copy it into the Installed Packages directory
  4. Restart Sublime Text

参考资料:

http://wbond.net/sublime_packages/package_control/installation