Menu

configure syntax highlighting for r script

Help
2011-10-15
2013-01-15
  • joseph dong

    joseph dong - 2011-10-15

    Hi,

    I'm new to RKward and I'd like to use it as my main R IDE under linux because it has a debugger.

    I'm configuring syntax colors from menu Settings > Editor.

    My question is :
    I'm not able to set colors for R control keywords such as "for", "in" "while", etc,
    while I am able to set colors for many others.

    Could some expert help me on this issue?
    Also I notice the word "Schema" is used for color template, I wonder if an xml is use as the color configuration file.

    Thanks!
    Joseph

     
  • Thomas Friedrichsmeier

    Hi!

    My question is : I'm not able to set colors for R control keywords such as "for", "in" "while", etc, while I am able to set colors for many others.

    Admittedly, I had to search hard to find this, myself: When a script window is opened, go to "Settings->Configure Editor…->Fonts & Colors". There, open the tab that reads "Highlighting Text Styles" (not "Normal Text Styles"), and select "Scripts/R Script" in the dropdown box. Now you can customize all colors used in the R syntax highlighting, while the "Normal Text Styles" allows you to control generic styles used for all types of highlighting.

    Also I notice the word "Schema" is used for color template, I wonder if an xml is use as the color configuration file.

    Different applications which use "katepart" for text editing can use different color schemes. The configuration for these is stored in ~/.kde/share/config/kateschemarc . In addition to this, the highlighting definition itself is written in xml. You should find it in this directory:

    cd `kde4-config --install data`/katepart/
    

    More info on these katepart internals can be found at http://kate-editor.org .

    Regards
    Thomas

     
  • joseph dong

    joseph dong - 2011-10-17

    Thx a lot for the clear explanation!