Sublime Text 2 中 Jade 的语法高亮显示?

发布于 2024-12-08 12:32:01 字数 163 浏览 0 评论 0原文

我刚刚开始在 Mac 上使用 Sublime Text 2。我也刚刚开始在 Node.js 中使用 Jade 来表达我的观点,我想知道是否有办法添加语法在 Sublime Text 2 中突出显示 Jade。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

无言温柔 2024-12-15 12:32:02

如果你安装了 git,这对我来说非常有效:

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

额外让手写笔语法突出显示工作运行:

git clone https://github.com/stylus/stylus.git Stylus

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
变身佩奇 2024-12-15 12:32:02

Sublime Text 2 支持 Textmate 语法定义文件。 https://github.com/miksago/jade-tmbundle 有一个 Jade Textmate 捆绑包。

通过在 Sublime Text“Packages”文件夹中创建一个新文件夹进行安装,调用新文件夹 Jade,然后 curl -O https://raw.github.com/miksago/jade-tmbundle /master/Syntaxes/Jade.tmLanguage 或以其他方式将该文件下载到新文件夹中。编辑器将立即加载语法。

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.

洛阳烟雨空心柳 2024-12-15 12:32:02

为什么是的,有!它也使用了一个很好的打包系统:

  1. 如果需要,请从此处安装 Package Control
  2. 打开命令面板(command + shift + P)并转到 Package Control(只需键入“install”)。您可能需要等待存储库更新。
  3. 在包控件中键入“jade”以查找 Jade 语法突出显示包。按 Enter 键进行安装。

现在,您可以为 Jade 提供语法高亮显示,并为其他 Sublime 好东西提供一个漂亮的包控制器。 此搜索显示了许多可用于使用 Jade、Jade+Bootstrap、pyjade 等的工具

< strong>编辑 - 安装此软件包后不需要重新启动 Sublime,因此删除了此步骤。

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.

月牙弯弯 2024-12-15 12:32:02

@jurka-

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

克隆到上面显示的 Linux 路径。

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

惜醉颜 2024-12-15 12:32:02

Jade 也可以通过 Sublime Package Control 获得。

Jade is also available via the Sublime Package Control.

梓梦 2024-12-15 12:32:02

对于 ubuntu 11.10,我的包的正确路径是 ~/.config/sublime-text-2/Packages
您可以使用菜单轻松找到您的包裹位置:“首选项”-> “浏览包...”

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

夏至、离别 2024-12-15 12:32:02

接受的答案是指已弃用且不再有效的插件。
对于那些仍在为 Sublime Text 寻找受支持的 Jade 插件的人,您应该使用此存储库:

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

这也在 Package Control 上:

https://packagecontrol.io/packages/Jade

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

极致的悲 2024-12-15 12:32:02

如果您使用的是 Mac:

转到 Library/Applciation Support/Sublime Text 2/Packages/ 然后,

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

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
他夏了夏天 2024-12-15 12:32:02

我在 linux ST2 build 2221 上做了以下操作

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

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

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/
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文