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

List:       kwrite-devel
Subject:    Re: folding non java/cpp code
From:       Joseph Wenninger <jowenn () jowenn ! at>
Date:       2002-12-06 18:10:04
[Download RAW message or body]

Hi

> 
> I've looked at the cpp.xml file for an example and the mechanism for using 
> code-folding in a highlight file is surprisingly easy to use.  Unfortunately, 
> I do most of my coding in python which uses indentation instead of delimiters 
> to determine code-blocks.  How difficult would it be to have the highlight 
> mechanism recognize indentation changes in addition to strings.  That way I 
> could very easily add code-folding for python.  What files would you suggest 
> I make changes to in order to add this feature?  Thanks for any help.
> 
> -- Christian Bird

The affected files would be katehighlight.cpp (either for an additional
HlItem class or direct handling in doHighlight), katetextline and
katebuffer to store the indentation depth.

I have never done anything in pyhton. Are
<SPC><SPC><SPC>,<SPC><SPC><TAB>,<SPC><TAB><TAB>,<TAB><TAB><TAB> equal or
are they handled as different indentations or are the equal ?

Kind regards
Joseph Wenninger

_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@mail.kde.org
http://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