Syntax highlighting for Jade in Sublime Text 2?

EditorSublimetext2PugSyntax HighlightingSublimetext

Editor Problem Overview


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.

Editor Solutions


Solution 1 - Editor

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

Solution 2 - Editor

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.

Solution 3 - Editor

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.

Solution 4 - Editor

@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.

Solution 5 - Editor

Jade is also available via the Sublime Package Control.

Solution 6 - Editor

For ubuntu 11.10 correct path to packages for me is ~/.config/sublime-text-2/Packages You can easily find your packages location using Menu: "Preferences" -> "Browse Packages..."

Solution 7 - Editor

The accepted answer refers to a plugin that is deprecated and no longer active. For those who are still looking for a supported Jade plugin for Sublime Text, you should use this repo:

https://github.com/davidrios/jade-tmbundle

This is also on Package Control:

https://packagecontrol.io/packages/Jade

Solution 8 - Editor

If you are on Mac:

Go to Library/Applciation Support/Sublime Text 2/Packages/ then,

curl -O https://raw.github.com/miksago/jade-tmbundle/master/Syntaxes/Jade.tmLanguage

Solution 9 - Editor

I've made the following on linux ST2 build 2221:

git clone https://github.com/miksago/jade-tmbundle.git Jade.tmbundle

Then

zip -r Jade.zip Jade.tmbundle/
mv Jade.zip Jade.sublime-package
mv Jade.sublime-package /sublime_folder_location/Pristine Packages/

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJames SimpsonView Question on Stackoverflow
Solution 1 - EditorSavoryBytesView Answer on Stackoverflow
Solution 2 - EditorRob CowieView Answer on Stackoverflow
Solution 3 - EditorSimonView Answer on Stackoverflow
Solution 4 - EditorVincent MacView Answer on Stackoverflow
Solution 5 - EditorcscholView Answer on Stackoverflow
Solution 6 - EditorEugeneView Answer on Stackoverflow
Solution 7 - EditorJosh HardyView Answer on Stackoverflow
Solution 8 - EditorIrteza FarhatView Answer on Stackoverflow
Solution 9 - EditorbrrystrwView Answer on Stackoverflow