Syntax highlighting for Jade in Sublime Text 2?

后端 未结 9 1890
无人及你
无人及你 2020-12-12 10: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 in

相关标签:
9条回答
  • 2020-12-12 11:03

    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
    
    0 讨论(0)
  • 2020-12-12 11:04

    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.

    0 讨论(0)
  • 2020-12-12 11:13

    Why yes, there is! And it uses a nice packaging system too:

    1. If you need to, install Package Control from here
    2. Open the command palette (command + shift + P) and go to Package Control (just type "install"). You may need to wait for the repository to be updated.
    3. When in package control type "jade" to find the Jade Syntax Highlighting package. Hit enter to install it.

    You now have syntax highlighting for Jade and a nifty package controller for other Sublime goodies. This search shows a lot of available tools for working with Jade, Jade+Bootstrap, pyjade, etc

    Edit - Sublime doesn't need to be restarted after installing this package so this step was removed.

    0 讨论(0)
提交回复
热议问题