[TxMt] Help with Smarty tags...
Allan Odgaard
throw-away-1 at macromates.com
Tue May 30 06:58:19 UTC 2006
On 27/5/2006, at 12:38, Eric Coleman wrote:
> I have enabled the Smarty bundle, but have an issue.
>
> I use <% for open, and %> for close. Im not sure exactly all the
> places I need to change this in the smarty bundle, or what the
> proper format would be. I tried playing around in the bundle, but
> no matter what I did I couldn't seem to get it correct.
This would need to be changed in the HTML bundle / language grammar.
Near the bottom there is the following rule:
smarty = { patterns = (
{ begin = '(\{(literal)\})';
end = '(\{/(literal)\})';
captures =
{ 1 = { name = 'source.smarty.embedded.html'; };
2 = { name = 'support.function.built-in.smarty'; };
};
},
{ name = 'source.smarty.embedded.html';
begin = '{{|{';
end = '}}|}';
patterns = ( { include = 'source.smarty'; } );
disabled = 1;
},
);
};
First you need to change “disabled = 1” to 0 (or remove it), but you
probably did that.
The next thing is to change the begin/end patterns to match <% and %
>. One caveat though, this syntax is currently also matched for
embedded Ruby. This rule is just above the Smarty rule, and you would
need to remove that one.
More information about the textmate
mailing list