sublimetext2 - Sublime color syntax for Ruby variables vs keywords -


is there way sublime text 2 display different colors ruby "variables" vs "keywords"? image below example of ruby code default monokai color scheme. hoping having variables (list, x) different color keywords (each, print).

currently, they're tied <key>foreground</key>. did try changing variable color, changed |x|.

example of ruby color syntax

no, there not way default ruby syntax ships sublime. list, each, print, , x scoped source.ruby, meaning don't have specific scope can targeted color scheme. on other hand, end scoped keyword.control.ruby, , do keyword.control.start-block.ruby (in addition base source.ruby scope applies elements), if have rule in color scheme keyword or keyword.control, can colored differently. |x| punctuation.separator.variable.ruby pipes |, , variable.other.block.ruby x, can adjusted per preferences.

essentially, item can colored if has distinct scope, , color scheme contains rule scope (or more generalized version of it, not more specific version of it). ruby challenging compared python, example, while python methods have parentheses @ end (string_var.replace(), example) , regexes can written highlight between dot . , parens function call, ruby not follow paradigm, syntax highlighting definition (found in various .tmlanguage files) cannot distinguish between method call , simple attribute, , cannot highlight them differentially. why list.each in program source.ruby, , each not highlighted function.


Comments

Popular posts from this blog

How to run C# code using mono without Xamarin in Android? -

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -