[TextMate] defining syntaxes
Brian Lalor
blalor at bravo5.org
Wed Oct 6 13:42:12 UTC 2004
Couple of questions regarding syntaxes:
I'm working on modifying the HTML syntax to support JSP. I've created
the following definition for comments; JSP and HTML comments are
similar. JSP comments look like <%-- comment --%>. I can use a simple
regexp to search for <!-- or <%--, but is there a way to be smarter
about how the comment ends? I'd like to make sure an illegal JSP
comment gets highlighted as such:
WRONG:
<%-- -->
... or maybe ...
<%-- --> --%>
I've currently got the (not quite smart enough) pattern:
{
name = "Comments";
begin = "<[%!]--";
end = "--%?>";
foregroundColor = "red";
},
How is the "include" keyword supposed to work in a pattern? I've tried
this:
name = "Embedded Java";
backgroundColor = "#E5E5E5";
begin = "<%";
include = "Java";
end = "%>";
... but that only highlights the background of the excursion, not the
text within. I've created a Java bundle with "Java" defined in
Syntaxes/Java.plist.
--
__ ____
/ / / __/ Brian Lalor
/ _ \/__ \ blalor at bravo5.org
/_.__/____/ http://bravo5.org/
More information about the textmate
mailing list