sublime能够支持AngularJS开发那绝对是一件很爽的事情。下面我一步步讲解如何为sublime安装AngularJS插件。
1、添加控制包站点
根据你安装sublime 版本不同,在控制台写入不同的代码 :
控制台打开方法:View > Show Console 或者 快捷键 ctrl+`
Sublime Text 3:
<pre name="code" class="javascript">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:
<pre name="code" class="html">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')
2、快捷键 ctrl+shift+p (Windows) or cmd+shift+p (OS X) 打开命令行并选择安装包
选择安装AngularJS包:
如果你安装的是sublime2 还需要参考这里: 点击打开链接
测试下安装是否成功了
版权声明:本文为小平果原创文章,转载请注明:http://blog.csdn.net/i10630226