[SVN] language help

Steven Ross nowhiding at gmail.com
Thu Apr 17 13:06:20 UTC 2008


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.

On Wed, Apr 16, 2008 at 3:15 PM, Daniel Stockman <daniel.stockman at gmail.com>
wrote:

> To capture 'validate', which is the name of the function:
>
>  <cffunction name="validate" returnType="array" access="private"
> > hint="returns error array">
> >
>
> Place this in your repository:
>
> cffunction = {
>  name = 'meta.tag.language.cfml.function';
>  begin = '<(cffunction)';
>  end = '>';
>  captures = { 1 = { name = 'entity.name.tag.cfml'; }; };
>  patterns = (
>    { match = '(?<=name=)(")([A-Za-z$_0-9]+)(")';
>      captures = {
>        0 = { name = 'string.quoted.double.cfml'; };
>        1 = { name = 'punctuation.definition.string.begin'; };
>        2 = { name = 'entity.name.function-name.cfml'; };
>        3 = { name = 'punctuation.definition.string.end'; };
>      };
>    },
>    { include = 'source.cfml'; },
>    { include = '#tag-stuff'; },
>  );
> };
>
> 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.
>
> 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)
>
> Hope this helps,
>
> Daniel
> http://evocateur.org/
>
>
> _______________________________________________
> textmate-dev mailing list
> textmate-dev at lists.macromates.com
> http://lists.macromates.com/mailman/listinfo/textmate-dev
>



-- 
Steven Ross
web application & interface developer
http://blog.stevensross.com
[mobile] 404-488-4364 [fax] (404) 592-6885
[ AIM / Yahoo! : zeriumsteven ] [googleTalk : nowhiding ]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate-dev/attachments/20080417/80fefc79/attachment.html>


More information about the textmate-dev mailing list