ruby - Sublime Monokai 语法高亮 : How to color method calls and make the color different inside of interpolated strings

标签 ruby syntax colors sublimetext2 highlighting

对于 Sublime 的 Monokai 主题与 Ruby,你如何

1) 颜色方法调用

enter image description here

(即如何让“generate_key”变成不同的颜色。

2) 使内插字符串内部的颜色不同。

enter image description here

也就是说,你如何制作“这是在里面。哈尔普!”不同的颜色?

最佳答案

对于你的第二个问题,将其包含在你的颜色主题中(更多信息 here ):

<dict>
    <key>name</key>
    <string>Embedded Ruby Source</string>
    <key>scope</key>
    <string>string source.ruby.embedded.source</string>
    <key>settings</key>
    <dict>
        <key>foreground</key>
        <string>#D01F1E</string>
    </dict>
</dict>

结果:

enter image description here

第一个问题,你可以试试this找出方法调用关键字的绝佳工具。

关于ruby - Sublime Monokai 语法高亮 : How to color method calls and make the color different inside of interpolated strings,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13775385/

相关文章:

ruby-on-rails - Rails 5,每个页面都需要事件记录

ruby-on-rails - rails : has_many through association - did I get this right?

ios - Swift 3.2 中任何调用函数 append.contentsOf 语法错误的数组

python - 为什么元组以字符串格式使用

java - Android ListView 滚动时丢失背景颜色

ruby - serverspec 命令返回空白字符串

ruby-on-rails - Ruby 占用 99.3% CPU

syntax - F# 区分联合语法说明

css - 如何删除或更改默认按钮样式?

algorithm - Delta E (CIE Lab) 在 SQL 中计算和排序的性能