packagecontrol.io 点击步骤 根据sublime的版本进行拷贝代码进入packagecontrol.io网站 , 下载
** sublime3
版本的代码如下**
import urllib.request,os,hashlib; h = 'df21e130d211cfc94d9b0905775a7c0f' + '1e3d39e33b79698005270310898eea76'; 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://packagecontrol.io/' + 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)
** sublime2
版本的代码如下**
import urllib2,os,hashlib; h = 'df21e130d211cfc94d9b0905775a7c0f' + '1e3d39e33b79698005270310898eea76'; 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://packagecontrol.io/' + 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')
点击打印图标
弹窗后点击打印图标
拷贝代码
command + shift +P 弹窗后输入install选择第一项输入完成之后sublime会自动安装 , 然后请点击
command
+shift
+P
显示弹窗:
弹窗如何选择插件 安装完成后在设置一下babel在JSX的与发下高亮即可!!!这样就能保证sublime支持ES6的语法啦~哈哈哈哈输入完成之后注意sublime的左下角会进行自动安装.....请耐心等待
网友评论