Created
October 8, 2013 07:36
-
-
Save yourtion/6881008 to your computer and use it in GitHub Desktop.
Sublime Text 2 插件安装的方法
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.直接安装 | |
安装Sublime text 2插件很方便,可以直接下载安装包解压缩到Packages目录(Data\Packages) | |
打开Packages的方法:在Sublime text 2的菜单中找到->preferences->packages。 | |
2.使用Package Control组件安装 | |
也可以安装package control组件,然后直接在线安装: | |
按Ctrl+`调出console | |
复制粘贴以下代码并去掉换行,到底部命令行并回车: | |
重启Sublime Text 2。 | |
如果在Perferences->package settings中看到package control这一项,则安装成功。 | |
如果这种方法不能安装成功,可以到这里下载文件手动安装。 | |
用Package Control安装插件的方法: | |
按下Ctrl+Shift+P调出命令面板 | |
输入install 调出 Install Package 选项并回车,然后在列表中选中要安装的插件。 | |
不爽的是,有的网络环境可能会不允许访问陌生的网络环境从而设置一道防火墙,而Sublime Text 2 貌似无法设置代理,可能就获取不到安装包列表了。 | |
好,方法介绍完了。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/' +pf.replace( ' ','%20' )).read()); print( 'Please restart Sublime Text to finish installation') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/' + pf.replace(' ','%20')).read()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment