为什么 Aptana 不为 PHP 中的正则表达式着色?

发布于 2024-12-22 03:03:21 字数 423 浏览 3 评论 0原文

我多年来一直是 Textmate 的用户,但几天前我爱上了 Aptana,并将其设置为使用 Textmate 颜色。大多数情况下,所有内容都会以正确的方式着色,但 PHP 除外,其中每个字符串看起来都相同。

在 Textmate 中,如果您创建类似 $a="SELECT * from table" 的字符串,它会检测到您正在编写 SQL 查询并以正确的方式为其着色;同样适用于 $a="/regex/",但在 Aptana 上却没有发生。

我知道它是 PHP 解析器,因为 Javascript 工作得很好:你可以输入 var a=/regex/ ,你会得到不同颜色的正则表达式。

我想知道是否有人能够进入解析器的源代码来编辑它,并尝试将其替换为 Textmate 的源代码(可在语言包中找到)。

预先非常感谢:)

I've been a user of Textmate for many years, but I felt in love with Aptana a few days ago and I set it up to use Textmate colors. Mostly everything gets colorized the right way except for PHP, where every string looks the same.

In Textmate, if you make an string like $a="SELECT * from table", it detects you're writing an SQL query and colorizes it the right way; same works for $a="/regex/", but it's not happening on Aptana.

I know it's the PHP parser because Javascript works fine: you can type var a=/regex/ and you will get the regular expression in a different color.

I'd like to know if someone has been able to get into the parser's source code to edit it, and try to replace it with Textmate's one (which is available on the language bundle).

Thanks very much in advance :)

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

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

发布评论

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

评论(1

猫卆 2024-12-29 03:03:21

首先确保您安装了 aptana 的 php 库插件,否则它将无法识别它并对其进行着色。然后重置您的着色选项。我一开始也遇到了同样的问题,php没有被着色,然后我安装了一个php库,抱歉我现在无法访问该名称,如果你明天仍然感兴趣,我会发布它,重新启动后它会被识别,着色并建议php代码正确。抱歉,跑了句子。

希望有用,

哦,我应该注意到这是用 aptana 2 实现的。

First make sure you have a php library addon for aptana installed, otherwise it will not recognize it and colorize it. Then reset your colorize options. I had the same problem at first, php not being colorized, then i installed a php library, sorry i cant access the name right now, if you are still interested tomorrow i will post it, and after a restart it recognized, colorized and suggested php code correctly. Sorry for the run on sentence.

Hope that works,

Oh and i should probably note this was with aptana 2.

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