On 25/08/2005, at 19.06, Chris Ruzin wrote:
Thanks for the help, Allan. I tried adding in the include where you mentioned, but it doesn't work. The EE tags are highlighted and folded, but not the HTML.
Sorry, I placed it wrong. I made it a child of “constant.tag.ee” rule, when it should have been a sibling.
Also, EE tags can be used in more than HTML. They can be used in XML, PHP, JavaScript, CSS and others. Will that mean I need to add all those other languages too, or will text.html.basic work for all of those?
hmm, that's a little problematic, because while the HTML language will take care of embedded PHP, CSS, and JavaScript, it will use a special set of (included) patterns for these subsets of the document, which doesn't include the EE rules.
So for this to really work, you'd have to duplicate the HTML syntax, and add the EE rules to that (the EE rules can be added to the repository part, and included from the 4 contexts (plain HTML, JS, CSS, and PHP), much like PHP is currently included in the CSS and JS sub-contexts.
fileTypes = ( "html", "htm", "php" ); foldingStartMarker = "\\{(exp:([a-zA-Z0-9:]+)|if)\\b.*?\\}"; foldingStopMarker = "\\{/(exp:([a-zA-Z0-9:]+)|if)\\}"; patterns = ( { name = "constant.tag.ee"; begin = "\\{/?([-a-zA-Z0-9_:]+)"; end = "\\}"; captures = { 1 = { name = "entity.name.tag.html"; }; }; patterns = ( [...] { name = "string.single-quoted.ee"; begin = "'"; end = "'"; },
Here you add:
{ include = "text.html.basic"; },
); }
Should have been here. Add a comma after the bracket above and insert: { include = "text.html.basic"; },
);
}