@vitaLee, try this: this will make all ruby keywords underlined, but do will be outlined.
Put this in your User folder for now as rubykeywords.py
[pre=#2D2D2D]def post_match(view, name, first, second, center, bfr, threshold):
bracket_name = ârubydoâ if bfrfirst.begin:first.end] == âdoâ else name
return first, second, bracket_name[/pre]
Define âdoâ in the original ruby, and create a ârubydoâ after that as seen below.
[pre=#2D2D2D] // Ruby conditional statements
{
ânameâ: ârubyâ,
âopenâ: â^\s*\b(if|until|while|begin|class|module|do|def\s*[a-zA-Z_]+)\bâ,
âcloseâ: â\b(end)\bâ,
âiconâ: âdotâ,
âcolorâ: âkeywordâ,
âstyleâ: âunderlineâ,
âscope_excludeâ: âstringâ, âcommentâ],
âplugin_libraryâ: âUser.rubykeywordsâ,
âlanguage_filterâ: âwhitelistâ,
âlanguage_listâ: âRubyâ],
âenabledâ: true
},
{
ânameâ: ârubydoâ,
âopenâ: â^\s*\b(do)\bâ,
âcloseâ: â\b(end)\bâ,
âiconâ: âdotâ,
âcolorâ: âkeywordâ,
âstyleâ: âoutlineâ,
âscope_excludeâ: âstringâ, âcommentâ],
âlanguage_filterâ: âwhitelistâ,
âlanguage_listâ: âRubyâ],
âenabledâ: true
},[/pre]
You can extend this concept to break out as many as you want. I do assume that if too many separate kinds of brackets are defined for one sytntax file, that you could theoretically hit a limit, but even if you split all of the ruby keywords into their own separate one, you probably wouldnât hit it.
Hopefully in the future I can fix it so that BH will be smart enough to resolve these kinds of things without the need of a plugin.