sublime配置jade语法高亮

今天在慕课网上看 scott老师讲的node+mongodb 建站攻略(一期)

就在自己亲手实践的时候发现jade语法没法高亮. 我的开发平台是ubuntu,工具是sublime3,sublime3之前就有没法中文输入的问题,所以还是老思路,在网上找插件

打开sublime3,再打开 view > show console,把下列代码复制到console框内

import urllib.request,os,hashlib; h = 'eb2297e1a458f27d836c04bb0cbaf282' + 'd0e7a3098092775ccb37ca9d6b2e4b7d'; 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 = 'eb2297e1a458f27d836c04bb0cbaf282' + 'd0e7a3098092775ccb37ca9d6b2e4b7d'; 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')

在底部栏会看到显示导入pakeage control成功

重启sublime,然后在 preferences >package control >选择package control:install package

再在选框中输入 jade >然后重启,即可看见jade语法高亮了

参考资料package control

你可能感兴趣的:(sublime-text)