On Jul 9, 2006, at 11:18 PM, Allan Odgaard wrote:
On 9/7/2006, at 20:02, Gerd Knops wrote:
[...] I would love to see a more powerful folding implementation, even if it means folding is only calculated during open/save of files.
I am all for more powerful foldings, but it seems your suggestion implies that folding logic was moved to a plug-in and only applied during load/save.
No, the 'only during load/save' remark was because you mentioned TM having to potentially look at the entire code for folding info would not scale. I'd rather have a more powerful folding implementation than real-time folding marker updates.
The big disadvantage of this is that most users can’t write plug- ins and moving to a code-based system (instead of the currently declarative approach) also makes supporting mixed document types infeasible.
Agreed.
Personally I am interested in semantic foldings [1] which speaks for integrating them with the language parser, where again moving them to plug-ins would be counterproductive for that.
[1] Realistically I will probably need 2-3 “modes” in which one of them was the semantic mode, as semantic foldings can’t handle all the user desires I am aware of.
I'd be happy with a language parser-like implementation, but it would have to get around the 'one line at a time' in order to gobble up empty lines, or opening braces on the next line etc. Also in some situations it would be handy to have a folding-start be also a folding stop.
Gerd