在 Textmate 中突出显示函数调用

发布于 2024-09-13 06:23:56 字数 314 浏览 1 评论 0原文

感觉我在这里错过了一些非常简单的东西。我已经使用 Coda 一段时间了,现在正在使用 Textmate。我无法找到在 Textmate 中语法突出显示函数调用的方法。我查阅了文档,但不敢相信我必须深入研究 Textmate 并使用正则表达式才能完成这项工作。

这是在textmate中: https://i.sstatic.net/3uSmz.png

函数调用继承前景色。这是 javascript,但我在 PHP 中也得到了同样的结果。

It feels like I'm missing something really simple here. I've been using Coda for a while now and I'm now playing around with Textmate. I'm unable to find a way to syntax highlight function calls in Textmate. I've poked around the documentation but can't believe I'd have to dig deep into Textmate and mess around with regex to make this work.

This is in textmate: https://i.sstatic.net/3uSmz.png

Function calls are inheriting the foreground color. This is javascript but I get the same in PHP.

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

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

发布评论

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

评论(1

冬天的雪花 2024-09-20 06:23:56

在 Textmate 中,语法着色完全由相关语言“包”中的语言定义控制。 PHP (HTML) 和 Javascript 包都对函数定义进行了特殊处理,但都没有突出显示函数调用

所以,是的,如果您想更改此设置,则需要使用捆绑包编辑器并学习编辑基于正则表达式的语言定义(在捆绑包中标有 L 图标)。

In Textmate, syntax coloring is entirely controlled by the language definition in the "bundle" of the relevant language. Both the PHP (HTML) and Javascript bundles give function definitions special treatment, but neither highlights function calls.

So yes, if you want to change this, you'll need to use the Bundle Editor and learn to edit the regex-based language definition (marked with an L icon in the bundle).

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