Last active
March 7, 2018 23:23
-
-
Save OdatNurd/99acc1dbbeec83bbdb46f876990cd764 to your computer and use it in GitHub Desktop.
Fold all newly loaded files and all files loaded from the session file at Sublime startup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime | |
import sublime_plugin | |
def fold(view): | |
view.run_command("fold_by_level", {"level": 2}) | |
def plugin_loaded(): | |
for window in sublime.windows(): | |
for view in window.views(): | |
fold(view) | |
class FoldingEventListener(sublime_plugin.EventListener): | |
def on_load_async(self, view): | |
fold(view) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment