Sublime Forum

Folding on_load

#1

Org Mode supports tags like
#+STARTUP: overview showeverything

That control the folding status of a file when it is loaded.
Sublime seems to persist the state of folds.

I have a an on_load event listener that is unfolding everything and trying to reset the fold status of the file in the presence of one of these tags. I am finding however that the fold restoration (by sublime) seems to happen AFTER my on_load event. New folds appear but any folds I clear are still restored.

Is there any way to turn that off for a file type or run after/replace that hook?

0 Likes

#2

Sublime doesn’t persist the state of folds on it’s own; all files always open unfolded regardless of what might have been folded when they were closed. This also includes files that were folded when Sublime was terminated while hot_exit is enabled; when the session is restored, the fold status of everything is lost.

If you’re seeing Sublime restoring folds on its own, then I would guess that you have a package or plugin that’s doing it.

0 Likes

#3

Okay, that makes sense… Now to track that down!

0 Likes

#4

Thank you, yes it was another plugin!
This was very instructive.

0 Likes