[Kde-bindings] Code folding support for ruby

Richard Dale Richard_Dale at tipitina.demon.co.uk
Wed Nov 3 17:59:06 UTC 2004


On Wednesday 03 November 2004 13:05, Thibauld Favre wrote:
> Hi all,
>
> Last weekend, I took the time to implement a first shot of code folding
> support for ruby. You'll find the ruby.xml file attached to this email.
> It's pretty complete in my opinion but it sure needs a bit of testing....
>
> The only thing it doesn't support is the "when" statement in "case"
> statement. Indeed, the problem is that the same "end" closes the last
> "when" or "else" statement AND the "case" statement :
>
> case foo
>  when x
>  when y
>  else
> end
>
> I wasn't able to solve this problem but I think that someone more familiar
> with kate xml highlighting could be able to find a solution. Also there's a
> problem supporting nested "case" statement.... So, for instance, with my
> file you can only fold the first "case" statement and it will fold the
> whole block.
>
> To test it, just put the ruby.xml file in your local
> .kde/share/apps/katepart/syntax directory
>
> You can report problems here :
> http://bugs.kde.org/show_bug.cgi?id=91123
I've been trying it out with KDevelop and it works pretty well - I like it! I 
hope you can commit it to the cvs if that's ok with the Kate guys. You can 
View->Code Folding->Collapse Toplevel, and after that find the methods you 
are interested in at the moment with the Class Browser and expand them - 
excellent..

-- Richard



More information about the Kde-bindings mailing list