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条回答
可以哭但决不认输i
2楼-- · 2019-01-20 22:49

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.

查看更多
The star\"
3楼-- · 2019-01-20 22:54

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

查看更多
Fickle 薄情
4楼-- · 2019-01-20 23:02

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
查看更多
别忘想泡老子
5楼-- · 2019-01-20 23:03

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

查看更多
兄弟一词,经得起流年.
6楼-- · 2019-01-20 23:03

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/
查看更多
The star\"
7楼-- · 2019-01-20 23:05

Jade is also available via the Sublime Package Control.

查看更多
登录 后发表回答