Bizarrely, one of the most requested “bug fixes” has been the enabling of folding for the XML scheme.
This was pretty simple, in the scheme file I changed this:
<language name="xml" title="XML" folding="false"...
to
<language name="xml" title="XML" folding="true"...
(note that it’s not that simple for all languages, scintilla needs to provide for folding a language before this flag can be enabled).
The changes will be included in the next release, and in the mean time you can download the modified xml scheme here: WebFiles.scheme
So, given that I’ve wiped that one out, those that requested it please feel free to add another bug to the previous blog entry!
U see - that’s what I thought too… and I’ve tried it several times without luck
but I’ve diff’ed your new file to my old one, and besides some additional CSS properties there’s one extra line, which does the trick:
<property name=”fold.html” value=”1″ />
- could you clarify as to what this one does?
How do you get PHP to fold (i’m guessing fold is where you have the plus/minus signs beside the code)?
Hi Christian, good catch, you’re absolutely right! For some reason, the HTML lexer needs an extra push to enable folding - I have no idea why.
As for PHP, I don’t think Scintilla currently supports folding for embedded PHP.
Hi,
I really like the code folding feature. But in version 2.0.5.48 there it seems to be impossible to save the ‘folded status’ unfortunately. Everytime a file is opened, you have to fold functions etc. again. Will a feature for saving folded things be available later?
FWIW I have had this turned on in Perl for quite some time. It works quite well.
Thanks, I’ve added perl folding by default to the next release.