[TxMt] Resetting folding metadata after non-TM file changes

Evan Jones evan_t_jones at mac.com
Mon Jan 30 22:58:56 UTC 2017


Hi all - 
	I keep a lot of functions folded in my normal workflow. This usually works fine, but when a non-TM program changes a file, (usually switching branches in Git from a client or command line) the folding settings aren't updated and I end up with strange folding in the middle of a line that may throw off everything in the file.  

This isn't a huge problem (and I bet if I always used TM's source control plugin, this would be handled automatically, right?) but I wonder if there's any way to just tell TM "hey, forget all the folding in this file".  One might think that cmd-opt-0 (Un/fold All Levels) would do this, but it seems to toggle all the folds without scanning the syntax to see if the fold locations are valid.  Anybody know how to just delete all folding for a given file?  As it is, I have to scan through big files, looking for hidden '...' glyphs.

I see this most often in Python, which has weird folding behavior, but I've also seen it in Objective C & Javascript, which should have much simpler folding grammars since they're {}-delimited.

Cheers,
Evan


More information about the textmate mailing list