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

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

问题描述

我找到了.

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

解决方案

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.

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 clone Ruby.tmbundle into some directory.

  2. Add this directory in Settings | TextMate Bundles:

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

(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)

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

Now you get Ruby syntax highlighting in PhpStorm:


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天全站免登陆