For some reason this doesnt work when I incorporate it into the bundle. I'm just trying to populate the symbol dropdown with this name. I guess the thing that is most irritating is that the regex I'm using works fine inside TM's find window but fails in the language definition.<br>
<br><div class="gmail_quote">On Wed, Apr 16, 2008 at 3:15 PM, Daniel Stockman <<a href="mailto:daniel.stockman@gmail.com">daniel.stockman@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
To capture 'validate', which is the name of the function:<div class="Ih2E3d"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8x;border-left:1px #ccc solid;padding-left:1ex">
<cffunction name="validate" returnType="array" access="private" hint="returns error array"><br>
</blockquote>
<br></div>
Place this in your repository:<br>
<br>
cffunction = {<br>
name = 'meta.tag.language.cfml.function';<br>
begin = '<(cffunction)';<br>
end = '>';<br>
captures = { 1 = { name = 'entity.name.tag.cfml'; }; };<br>
patterns = (<br>
{ match = '(?<=name=)(")([A-Za-z$_0-9]+)(")';<br>
captures = {<br>
0 = { name = 'string.quoted.double.cfml'; };<br>
1 = { name = 'punctuation.definition.string.begin'; };<br>
2 = { name = 'entity.name.function-name.cfml'; };<br>
3 = { name = 'punctuation.definition.string.end'; };<br>
};<br>
},<br>
{ include = 'source.cfml'; },<br>
{ include = '#tag-stuff'; },<br>
);<br>
};<br>
<br>
In the main patterns loop, simply { include = '#cffunction'; } somewhere before the end. This does assume a "source.cfml" scope exists, which probably doesn't exist on the "official" bundle, as I have hacked it severely for my own use/preferences.<br>
<br>
Once it's all in place, all you need to do is define a color for the 'entity.name.function-name.cfml' scope. (For simplicity, I took out the check for double or single quotes. Single quotes around attribute values are evil)<br>
<br>
Hope this helps,<br>
<br>
Daniel<br>
<a href="http://evocateur.org/" target="_blank">http://evocateur.org/</a><div><div></div><div class="Wj3C7c"><br>
<br>
_______________________________________________<br>
textmate-dev mailing list<br>
<a href="mailto:textmate-dev@lists.macromates.com" target="_blank">textmate-dev@lists.macromates.com</a><br>
<a href="http://lists.macromates.com/mailman/listinfo/textmate-dev" target="_blank">http://lists.macromates.com/mailman/listinfo/textmate-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Steven Ross<br>web application & interface developer<br><a href="http://blog.stevensross.com">http://blog.stevensross.com</a><br>[mobile] 404-488-4364 [fax] (404) 592-6885<br>
[ AIM / Yahoo! : zeriumsteven ] [googleTalk : nowhiding ]