Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Ebuild syntax highlighting in KDE
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 2159
Location: The Peanut Gallery

PostPosted: Fri Mar 09, 2007 3:16 pm    Post subject: Ebuild syntax highlighting in KDE Reply with quote

Hi all,

Following some discussion about syntax highlighting for ebuilds on the dev m-l, I hacked together a syntax highlighting file for katepart
(as used in kwrite and kate of course ;) based on the BASH one. You can d/l the first version from:

http://phpfi.com/214109
You need to save it in ~/.kde/share/apps/katepart/syntax and try it by opening a .ebuild or .eclass file. You can put it in /usr/share/apps/katepart/syntax if you don't want to edit it.

All it does is add the functions from the reference in the devmanual as a new word list (<list name="ebuild_cmds"> on line 91.) I also put in the inherit keyword.

The only other change is the addition of line 644:
<keyword attribute="Command" context="#stay" String="ebuild_cmds" />
and I added a priority attribute to the language so it will take precedence over BASH highlighting for ebuilds and eclasses.

It'd be good to add functions from other eclasses, maybe in a separate list. ATM the file has bash_completion, eutils, fdo_mime. flag-o-matic,
gnome2, rpm, subversion functions as per the devmanual.

Please do add functions and post changes.

HTH,
steveL.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
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