I love PyCharm, but can't seem to find a way to enable Ruby syntax highlighting. I know about RubyMine, but I'm not going to purchase a license just for this basic functionality. Is it possible to add Ruby syntax highlighting in PyCharm?
Asked
Active
Viewed 4,494 times
1 Answers
12
You can either create a new file type in Settings/File Types, add .rb as registered pattern there, and define your own syntax highlighting rules, or search for existing textmate bundles for Ruby files in the web, import them and use for syntax highlighting - see http://blog.jetbrains.com/phpstorm/2013/05/textmate-bundles-in-phpstorm/ and https://stackoverflow.com/a/16451778/2000323 for more info
-
This was really useful, thanks. Just one question - How can I change the color scheme used, after importing the Ruby text mate bundle? I don't like the white background, and would like to use a Darcula type theme, but don't see any options to edit the TextMate bundle formatting options in PyCharm prefs.... – Alex Bowyer Oct 22 '15 at 12:51
-
1In settings/Editor/TextMate Bundles, in scheme mappings table, choose 'Darcula' as Textmate color scheme for 'Darcula' IDE color scheme. Make sure to re-open the project – lena Oct 23 '15 at 12:41
-
TextMate Bundle works. This was useful as well: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206600695--rb-files-in-pycharm – Roman Jul 24 '18 at 18:12