[Rd] Highlighting in KDE editor Kate

E.L. Willighagen egonw@sci.kun.nl
Sat, 30 Mar 2002 14:08:21 +0100


Hi all,

Anyone interested in a highlighting module for Kate (as in KDE 2.2.2)?
Below is the module, which should be placed in something like:
~/.kde/share/apps/kate/syntax/

Or globally, in something like:
/opt/kde2/share/apps/kate/syntax/

Rather little functions are recognized right now, but it is clear how to add 
them.

The module:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="R Script" section="Sources" extensions="*.R" 
mimetype="application/x-R">
  <highlighting>
    <list name="commands">
      <item> c </item>
      <item> dev </item>
      <item> grey </item>
      <item> lm </item>
      <item> matrix </item>
      <item> outer </item>
      <item> persp </item>
      <item> postscript </item>
      <item> scan </item>
      <item> seq </item>
    </list>
    <contexts>
      <context attribute="0" lineEndContext="0">
        <keyword attribute="1" context="0" String="commands"/>
        <RegExpr attribute="2" context="0" String="#.*$" />
        <RangeDetect attribute="3" context="0" char="&quot;" char1="&quot;"/>
      </context>
    </contexts>
    <itemDatas>
      <itemData name="Normal Text" defStyleNum="dsNormal"/>
      <itemData name="Keyword" defStyleNum="dsKeyword"/>
      <itemData name="Comment" defStyleNum="dsComment"/>
      <itemData name="String"  defStyleNum="dsString"/>
      <itemData name="Attribute" defStyleNum="dsNormal" italic="1"/>
    </itemDatas>
  </highlighting>
  <general>
    <comments>
      <comment name="singleLine" start="#" />
    </comments>
  </general>
</language>

Regards,

Egon
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._