如何为 Sublime text 2 中的语言创建新的语法高亮集 [英] How do I create a new syntax hilighting set for a language in Sublime text 2

查看:30
本文介绍了如何为 Sublime text 2 中的语言创建新的语法高亮集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用令人惊叹的 Sublime Text 2 为 Maya 编写 MEL(Maya 嵌入式语言)脚本,但它没有为 MEL 突出显示语法.现在我强迫它把文本解释为 Perl,这做的不错,但它远非完美.添加 Maya 的命令会很方便.有人知道我将如何为 Sublime 创建语法高亮集吗?

I'm using the amazing Sublime Text 2 to write MEL (Maya Embedded Language) scripts for Maya, but it has no syntax highlighting for MEL. Right now I force it to interpret the text as Perl, which does an OK job, but its far from perfect. It would be handy to add Maya's commands. Does anybody know how I would create a syntax highlighting set for Sublime?

推荐答案

我一直在使用在 github 上找到的 MEL textmate 包.我分叉了它,添加了一些片段并稍微调整了语言.语言文件是 MEL.plist,但我将其更改为 MEL.tmLanguage,现在可以在 Sublime Text 2 中使用.所有代码段都可以正常工作.

I have been using a MEL textmate bundle I found on github. I forked it, added some snippets and tweaked the language a little. The language file was MEL.plist but I changed it to MEL.tmLanguage and it now works in Sublime Text 2. All the snippets work with no change.

如果您想使用它,请转到您的 Sublime Text Packages 目录并将存储库克隆到 MEL:

If you want to use it, go to your Sublime Text Packages directory and clone the repo to MEL:

git clone git@bitbucket.org:hoolymama/mel.tmbundle.git MEL

这篇关于如何为 Sublime text 2 中的语言创建新的语法高亮集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆