FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Syntax highlighting for kate

 
Post new topic   Reply to topic     Forum Index -> MDE
View previous topic :: View next topic  
Author Message
Cyborg16



Joined: 28 Apr 2007
Posts: 39

PostPosted: Tue Apr 08, 2008 10:35 am    Post subject: Syntax highlighting for kate Reply with quote

A more recent version is now distributed with katepart.

For those developers using the kate editor:

I have been making improvements to the D syntax highlighting for a while now; however, unfortunately most of my updates haven't made it into the kate highlighting database. Besides many small fixes and quite likely a higher parsing speed is separate colouration for statements, expressions, attributes and properties.

There's also a highlighting file for mergetag text files (part of mde), although the Configuration -> Cisco highlighting also works quite well.

Just put the relevant .xml files in ~/.kde/share/apps/katepart/syntax/ (d.xml requires ddoc.xml; mergetagtext.xml is independant).

Get them here.


Last edited by Cyborg16 on Sat Apr 04, 2009 2:38 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
vektorboson



Joined: 14 Sep 2006
Posts: 44

PostPosted: Tue Apr 08, 2008 2:59 pm    Post subject: Reply with quote

I wanted to say thanks, since I'm using your version of the syntax files. I made a small change though, since I had problems with indentation when typing left braces (OpenSUSE 10.2, KDE 3.5.9/Kate 2.5.9).

I changed the definition for the left and right brace:
Code:

<DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="BraceA" />
<DetectChar attribute="Symbol" context="#stay" char="}" endRegion="BraceA" />


And added a 'Symbol'-Itemdata (directly under the "Normal Text" itemdata):
Code:

<itemData name="Symbol"         defStyleNum="dsNormal"/>
Back to top
View user's profile Send private message
Cyborg16



Joined: 28 Apr 2007
Posts: 39

PostPosted: Wed Apr 09, 2008 3:58 am    Post subject: Reply with quote

Wow thanks vektorboson! I never figured out the C-Style indenter! I copied another rule from the C++ highlighter to enable support for brackets, switch case/default/break, etc.

I uploaded an update (same link) with some extra properties added too.
Back to top
View user's profile Send private message Send e-mail
Cyborg16



Joined: 28 Apr 2007
Posts: 39

PostPosted: Fri Jun 06, 2008 2:12 pm    Post subject: Reply with quote

Small update (VERY small fix and pure and nothrow keywords (presumably the keyword is actually "nothrow"?)).
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> MDE All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group