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 Answers
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

- 1,502
- 13
- 22

- 35,571
- 4
- 52
- 61
-
20just the 'follow these steps' response i was looking for. – emilebaizel Feb 07 '12 at 19:26
-
3@jurka For Ubuntu: ~/.config/sublime-text-2/Packages – Mustafa Jun 29 '12 at 15:04
-
1This worked for me on Mountain Lion. Make sure you reboot Sublime after installing this to see the syntax highlighting. – Matt Kneiser Nov 21 '12 at 00:31
-
2For Windows (7 at least) use: /c/Users/
/AppData/Roaming/Sublime Text 2/Packages – longda Aug 16 '13 at 19:06 -
**+1** *(Just to clarify)* Works on **Linux Mint Maya MATE AMD64** – iConnor Nov 02 '13 at 07:52
-
3THE AUTHOR HAS NOT MAINTAINED THIS REPO! A more recent repo is at https://github.com/davidrios/jade-tmbundle – jnovack Jan 10 '14 at 14:12
-
I initially thought that this did not work, but then discovered that Sublime had not automatically set the correct syntax for Jade files that were already open before I restarted Sublime. Simple matter to set the syntax or even just reopen the Jade file once I realized this. – bytesized Jul 06 '15 at 16:34
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.
-
12Thanks. Just for those who did not know it (me, for example), the packages folder on Linux is ~/.config/sublime-text-2/Packages – Elad Aug 29 '12 at 10:49
-
29Worked like a charm! On OS X Lion it's ~/Library/Application Support/Sublime Text 2/Packages/ – michael_erasmus Sep 02 '12 at 11:47
-
16Windows: C:\Users\
\AppData\Roaming\Sublime Text 2\Packages. Or on any platform just go to Preferences > Browse Packages in the editor to find the directory. – Fletch Oct 15 '12 at 10:37 -
+1 Worked great in Mountain Lion. Didn't even have to reload or restart Sublime. Might this replace Textmate for me? lol – cbmeeks Jan 26 '13 at 22:10
-
1
Why yes, there is! And it uses a nice packaging system too:
- If you need to, install Package Control from here
- 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.
- 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.
-
2Best answer! :) I didn't even restart as it was immediately available. I just picked the syntax from the list for already opened files. The new highlighter was already associated with .jade files. – WiredPrairie Jul 11 '12 at 13:49
-
Yeah, Package Control is amazing. It's only (very minor) flaw is that you can't use it for /everything/, as sometimes (rarely) language packs etc. don't get included in its list. – iono Aug 16 '12 at 17:27
-
8I do not see the Jade syntax highlighting package in the list - maybe it is no longer available? There is a Textmate/Sublime bundle from davidrios. – SnapShot Apr 06 '13 at 12:04
-
@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.

- 421
- 4
- 8
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..."

- 21
- 1
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:

- 361
- 2
- 4
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

- 51
- 6
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/

- 471
- 7
- 20