是否可以在PHPStorm中突出显示Ruby语法? [英] Is it possible to get Ruby syntax highlighting in PHPStorm?

查看:105
本文介绍了是否可以在PHPStorm中突出显示Ruby语法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现了,但是老实说,我不确定如何安装它或它是否适用.谢谢!

I found this but honestly not sure how to install it or whether it applies. Thanks!

推荐答案

Ruby插件仅适用于IntelliJ IDEA Ultimate,不适用于PhpStorm.有关更多详细信息,请参见此答案.

Ruby plug-in that you have linked is designed for IntelliJ IDEA Ultimate only, it will not work with PhpStorm. See this answer for more details.

但是,可以使用 TextMate捆绑包支持插件在PhpStorm中突出显示Ruby文件的基本语法.它已经包含在PhpStorm 6.0.1中,您无需安装它,只需确保已在Settings中启用了它. Plugins.

However, it's possible to get the basic syntax highlighting for Ruby files in PhpStorm using the TextMate bundles support plug-in. It's already included with PhpStorm 6.0.1 and you don't need to install it, just make sure it's enabled in Settings | Plugins.

  1. 将Git克隆 Ruby.tmbundle 放入某个目录.

Settings中添加此目录| TextMate Bundles:

由于某些原因,PhpStorm TextMate捆绑软件支持将无法识别此捆绑软件支持的*.rb文件.要解决此问题,请在某些文本编辑器中打开Ruby.tmbundle\Syntaxes\Ruby.plist文件,找到<key>fileTypes</key>部分,在<array>

For some reason PhpStorm TextMate Bundles support will not recognize *.rb files as supported by this bundle. To fix this problem open Ruby.tmbundle\Syntaxes\Ruby.plist file in some text editor, find <key>fileTypes</key> section, add <string>rb</string> under <array>

(以上内容应在最新的Ruby捆绑软件版本中修复,因此不再需要编辑捆绑软件,但如果添加其他语言捆绑软件,则可能需要进行调整)

(the above should be fixed in the latest Ruby bundle version, so the editing the bundle is no longer needed, but if you are adding some other language bundle, it's something you may need to adjust)

重新启动PhpStorm,确认现在已正确关联*.rb:

Restart PhpStorm, verify that *.rb is now associated correctly:

现在,您可以在PhpStorm中突出显示Ruby语法:

Now you get Ruby syntax highlighting in PhpStorm:

如果您需要在单个IDE中完全支持Ruby和PHP(以及更多功能),请考虑使用 IntelliJ IDEA Ultimate .

If you need full support for both Ruby and PHP (plus much more) in a single IDE, consider using IntelliJ IDEA Ultimate.

这篇关于是否可以在PHPStorm中突出显示Ruby语法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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