Syntax highlighting for Jade in Sublime Text 2?

2019-01-20 22:25发布

I just started using Sublime Text 2 on Mac. I also just started using Jade for my views in Node.js, and am wondering if there is a way to add syntax highlighting for Jade into Sublime Text 2.

9条回答
再贱就再见
2楼-- · 2019-01-20 23:09

If you have git installed, this worked perfectly for me:

cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
git clone https://github.com/davidrios/jade-tmbundle Jade

Bonus to get stylus syntax highlighting working run:

git clone https://github.com/stylus/stylus.git Stylus
查看更多
smile是对你的礼貌
3楼-- · 2019-01-20 23:12

Sublime Text 2 supports Textmate syntax definition files. There is a Jade Textmate bundle at https://github.com/miksago/jade-tmbundle.

Install by creating a new folder in your Sublime Text "Packages" folder, call the new folder Jade, then curl -O https://raw.github.com/miksago/jade-tmbundle/master/Syntaxes/Jade.tmLanguage or otherwise download that file into the new folder. The editor will load the syntax immediately.

查看更多
爷的心禁止访问
4楼-- · 2019-01-20 23:14

@jurka -

  • OS X: ~/Library/Application Support/Sublime Text 2/Packages/
  • Linux: ~/.Sublime Text 2/Packages/
  • Windows: %APPDATA%/Sublime Text 2/Packages/

Clone into the path shown above for linux.

查看更多
登录 后发表回答