I’m trying to run a method that traverses through each view on startup.
I thought it would work with an on_load event
def on_load_async(self, view):
print(234)
self.start(view)
on_load does work but only if I open files after Sublime finished the startup load.
234 is not printed in the console when I open Sublime, not is start() called.
I’ve tried putting it in init
def __init__(self):
print(sublime.windows())
for window in sublime.windows():
for view in window.views():
self.start(view)
When I open Sublime the console shows “[ ]” since apparently there are no windows ready yet.