First, download and install Kate Erlang syntax highlighting from
http://www.trapexit.org/Special:UserContributions (the site seems down
for now, but look for kate-synatx-highight.tar.gz near the bottom of the
page where the site comes up)
Then create an erltl.xml file in ~/.kde/share/apps/katepart/syntax and
paset the folloing in:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="ErlTL" version="1.00" kateversion="2.1"
section="Scripts" extensions="*.et" mimetype="text/x-erlang" priority="5">
<highlighting>
<contexts>
<context name="start" lineEndContext="#stay" attribute="Normal Text">
<RegExpr context="erltl" attribute="Keyword" String="<%"
beginRegion="erltl" />
<IncludeRules context="##HTML" />
<DetectIdentifier />
</context>
<context name="erltl" attribute="Erltl code" lineEndContext="#stay">
<DetectSpaces />
<StringDetect attribute="Keyword" context="#pop#pop"
String="%>" endRegion="erltl" />
<DetectChar attribute="CommentSymbol" context="onelinecomment"
char="!" />
<DetectChar attribute="FunctionDeclarationSymbol"
context="functiondecl" char="@" />
<DetectChar attribute="TopFormsSymbol" context="topforms"
char="~" />
<DetectChar attribute="TopExprsSymbol" context="topexprs"
char="?" />
<IncludeRules context="##Erlang" />
</context>
<context name="onelinecomment" attribute="Comment"
lineEndContext="#pop">
<StringDetect attribute="Keyword" context="#pop"
lookAhead="true" String="%>" />
</context>
<context name="functiondecl" attribute="Function Declaration"
lineEndContext="#pop">
<StringDetect attribute="Keyword" context="#pop"
lookAhead="true" String="%>" />
</context>
<context name="topforms" attribute="Top Foms" lineEndContext="#pop">
<StringDetect attribute="Keyword" context="#pop"
lookAhead="true" String="%>" />
<IncludeRules context="##Erlang" />
</context>
<context name="topexprs" attribute="Top Exprs" lineEndContext="#pop">
<StringDetect attribute="Keyword" context="#pop"
lookAhead="true" String="%>" />
<IncludeRules context="##Erlang" />
</context>
</contexts>
<itemDatas>
<itemData name="Normal text" defStyleNum="dsNormal" />
<itemData name="Erltl code" defStyleNum="dsNormal" />
<itemData name="Comment" defStyleNum="dsComment" />
<itemData name="Keyword" defStyleNum="dsKeyword" color="#0C225C"
selColor="#ffffff" bold="0" italic="0" />
<itemData name="FunctionDeclarationSymbol"
defStyleNum="dsKeyword" color="#0C225C" selColor="#ffffff" bold="1"
italic="0" />
<itemData name="CommentSymbol" defStyleNum="dsKeyword"
color="#0C225C" selColor="#ffffff" bold="1" italic="0" />
<itemData name="TopFormsSymbol" defStyleNum="dsKeyword"
color="#0C225C" selColor="#ffffff" bold="1" italic="0" />
<itemData name="TopExprsSymbol" defStyleNum="dsKeyword"
color="#0C225C" selColor="#ffffff" bold="1" italic="0" />
<itemData name="Function Declaration" defStyleNum="dsKeyword"
color="#880000" selColor="#ffffff" bold="1" italic="0"
backgroundColor="#F5F5F5" />
<itemData name="HTML Tag" defStyleNum="dsKeyword"
color="#0F0000" selColor="#ffffff" bold="0" italic="0" />
<itemData name="HTML Comment" defStyleNum="dsComment" />
</itemDatas>
</highlighting>
</language>
This is not too pretty and relies on Erlang highlighting to work. But
you can customize it to your own liking in the itemDatas section. If you
are not too happy with HTML code blocking up the view, simply remove the
<IncludeRules context="##HTML" /> line
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"erlyweb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---