Resetting folding metadata after non-TM file changes

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Resetting folding metadata after non-TM file changes

Evan Jones
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

_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Resetting folding metadata after non-TM file changes

Allan Odgaard-4
On 31 Jan 2017, at 5:58, Evan Jones wrote:

> […] I wonder if there's any way to just tell TM "hey, forget all the
> folding in this file".

The easiest is ⌘A + ⌫ + ⌘Z.

_______________________________________________
textmate mailing list
[hidden email]
http://lists.macromates.com/listinfo/textmate
Loading...