View previous topic :: View next topic |
Author |
Message |
Cyborg16
Joined: 28 Apr 2007 Posts: 39
|
Posted: Tue Apr 08, 2008 10:35 am Post subject: Syntax highlighting for kate |
|
|
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 |
|
|
vektorboson
Joined: 14 Sep 2006 Posts: 44
|
Posted: Tue Apr 08, 2008 2:59 pm Post subject: |
|
|
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 |
|
|
Cyborg16
Joined: 28 Apr 2007 Posts: 39
|
Posted: Wed Apr 09, 2008 3:58 am Post subject: |
|
|
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 |
|
|
Cyborg16
Joined: 28 Apr 2007 Posts: 39
|
Posted: Fri Jun 06, 2008 2:12 pm Post subject: |
|
|
Small update (VERY small fix and pure and nothrow keywords (presumably the keyword is actually "nothrow"?)). |
|
Back to top |
|
|
|