Sublime Forum

Open an extension with code folded automatically

#1

Would like to know if it’s possible to make an extension start/open the document with all code folded.

Hope everyone’s corona-free :slight_smile:

Cheers!

0 Likes

#2

It is possible. By default ST doesn’t store the folded code state in the Session.sublime-session file so you’ll have to have some kind of settings file that stores such data in some format and then restore that state when the user opens the file again (in a plugin of course)

0 Likes

#3

Thanks UltraInstinct05

Found a way with AHK, but it would still be cooler for the select doc to open as folded on auto. Who knows, maybe I revisit some time.

Cheers!

0 Likes