Registered Member
|
I am currently attempting to write my own syntax highlighting file.
I want to highlight a configuration format and as such I want to make valid keywords match the section in which they are used. The documentation is vague about the usage of beginRegion and endRegion. I figured the name given to them would allow me to distinguish between scopes and switch contexts accordingly. Example: Keyword1 { MyVar = Value MyVar2 = { something here } } Since MyVar and MyVar2 are only valid inside KeyWord1 I only want to highlight them there. If a user would type them outside the scope of Keyword1, they would be displayed as normal text. Currently I am doing this:
I was hoping that the context switch would start a region named "MyRegion" and further brackets will generate "InternalRegion" regions. After each closing bracket, each region is closed until finally there are no "InternalRegion" regions left. Then the "MyRegion" rule would match and the context switches back to the Main Body. Unfortunately it matches either rule holding the bracket (whichever is specified first) making me believe that the name is in fact not used at all... |
Administrator
|
If you do not recieve a response here, posting to the kde-devel or kde-core-devel mailing lists ( both at kde.org ) may help.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell