Just getting into TextMate (love it). I am trying to customize my own theme (don't know a lot about RegEx yet). In the Ruby Bundle the language settings have the following.
{ name = 'constant.other.symbol.ruby'; comment = 'symbols'; match = '(?<!:)(:)(?>[a-zA-Z_]\w*(?>[?!]|=(?![>=]))?|===?|>[>=]?|<[<=]?|<=>|[%&`/|]|**?|=?~|[-+]@?|[]=?|@@?[a-zA-Z_]\w*)'; captures = { 1 = { name = 'punctuation.definition.constant.ruby'; }; }; },
So to me this appears customizing the syntax of symbols and math operators. But when I Create a new Syntax element and set the scope to " constant.other.symbol.ruby" the symbols and math operators don't change to what I want. They stay like the default syntax "ruby.source" and i don't know why because the symbol information has a more detailed scope.
Also does anyone have a language element that I can add to my language definitions to allow me to chose syntax highlighting for function calls. Not function definition, but actual functions being called upon such as:
old_inventory = inventory_from(ARGV[0])
With "inventory_from" being the thing I want to highlight?
On 6/10/07, Brad Hutchins oshybrid@gmail.com wrote:
So to me this appears customizing the syntax of symbols and math operators.
Just symbols, I think. Math operators are keyword.operator.arithmetic.ruby.
But when I Create a new Syntax element and set the scope to " constant.other.symbol.ruby" the symbols and math operators don't change to what I want.
It works for me! If I have
puts :foo
for example. the symbol :foo changes to whatever appearance I specify for constant.other.symbol.ruby.
You havent *actually* put that leading space in your scope selector, have you? That would stop it working. Also, if you click in a symbol that isn't being displayed as you specify and press control-shift-P, does it definitely have the constant.other.symbol.ruby scope?
Robin
Ok, got it to work after I took the RubyTbundle out of CVS. Thanx
Brad
On 6/10/07, Robin Houston robin.houston@gmail.com wrote:
On 6/10/07, Brad Hutchins oshybrid@gmail.com wrote:
So to me this appears customizing the syntax of symbols and math operators.
Just symbols, I think. Math operators are keyword.operator.arithmetic.ruby .
But when I Create a new Syntax element and set the scope to " constant.other.symbol.ruby" the symbols and math operators don't change to what I want.
It works for me! If I have
puts :foo
for example. the symbol :foo changes to whatever appearance I specify for constant.other.symbol.ruby.
You havent *actually* put that leading space in your scope selector, have you? That would stop it working. Also, if you click in a symbol that isn't being displayed as you specify and press control-shift-P, does it definitely have the constant.other.symbol.ruby scope?
Robin
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate