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.
If anyone could provide some guidance, that would be very helpful :)
Eric Coleman
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.