[TxMt] folding perl pod?
Allan Odgaard
throw-away-1 at macromates.com
Mon Jul 10 04:18:06 UTC 2006
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.
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.
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 don’t know how much freedom you have with the POD markers, but
>> you could introduce a convention, e.g. trailing space after =head2
>> makes it not a fold marker. That would then allow you to manually
>> exclude the problematic folding markers.
> There are tens if not hundreds of thousands of perl files
> containing POD documentation, so this is impractical.
Ah, sorry. I thought the OP was writing his own code, not just
browsing through the hundreds of thousands of third party code out
there :p
More information about the textmate
mailing list