[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: Feature request: include syntax highlighting rules from modeline
From:       Andriy Lesyuk <s-andy () in ! if ! ua>
Date:       2006-10-30 16:27:51
Message-ID: 45462807.50209 () in ! if ! ua
[Download RAW message or body]

Matthew Woehlke wrote:
> Andriy Lesyuk wrote:
>> Some projects have project specific keywords, function names and so on. 
>> It would be great
>> if user could include its own or specially designed for the project 
>> syntax highlighting file. As
>> I understood kate already supports changing syntax highlighting by "hl" 
>> and "syntax" modelines.
>> What about adding modeline like "include-hl"?
>>
>> It should work like:
>>
>> /* kate: include-hl Alerts; */
>>
>> This string should include alerts.xml into currently used highlighting 
>> style. Actually it should work
>> like adding <IncludeRules "##Alerts" /> into corresponding xml file.
> 
> How would this be an improvement over writing your own .xml and using 
> 'hl: my-syn;'? It sounds like your solution involves writing a .xml 
> anyway, and writing one as a top-level highlighter is going to be more 
> flexible (and I suspect less error-prone, too) than what you are proposing.
> 
> Although I hear KDE4/KDevelop4 is supposed to be doing something along 
> these lines...

Actually I should add some new features to currently existing .xml to 
get what I
need. But this changes will be lost when katepart will be updated! So I 
should make
a copy from existing .xml? Ok... But I will need to rewrite it again 
when corresponding
.xml file will be updated. So such changes will be hard to maintain.

If Kate would support such modeline problems like these would go away... 
I don't agree
that writing my own highlighter will be more flexible. I hope you 
understood why.

As to errors: Yeah! They can be... But actually their presence depends 
on the developer
that will write the highlighter.
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic