This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Kate highlighting: dynamic in <keyword />.

0

Votes
0
0
Tags: None
(comma "," separated)
bac0n
Registered Member
Posts
5
Karma
0
OS
Hi!

I Really like kate and use it every day for tcl. Im trying to create a more restrictive highlighting and notice if I could use keyword dynamic I could chain lists.
Basically if the first keyword list has a match put that keyword in a placeholder and I can use it as "String" in the next keyword to match specific sub commands.

<list name="Commands">
<item>after</item>
</list

<list name="after">
<item>cancel</item>
<item>idle</item>
<item>info</item>
</list

<context name="KeywordCommands" attribute="Normal Text" lineEndContext="#stay">
<keyword String="Commands" attribute="Keyword" context="KeywordSubCommands" dynamic="true" />
</context>

<context name="KeywordSubCommands" attribute="Normal Text" lineEndContext="#stay">
<keyword String="%1" attribute="Keyword" context="#pop#pop" dynamic="true" />
</context>
...
...
...
Tcl uses braces.. mm.. to everything, it makes it hard to cover some cases, but if I could match pairs in RangeDetect it will really help (alot).
Ex: array set CoolArray { 1 {} 2 {} 3 {} }

<RangeDetect char="{" char1="}" matching="true" ... />


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]