wasp256
wasp256

Reputation: 6242

sublimetext3 event for program exit

Is there a possibility to capture an exit or quit in ST3? I saw this older question here and I tried both the on_windows_command and the on_text_command but neither seems to trigger the quit/exit!?

It there's none, it would also be fine if I could handle it on a restart of sublime, but the on_load doesn't seem to be called again on remembered views!?

Upvotes: 0

Views: 17

Answers (1)

Keith Hall
Keith Hall

Reputation: 16085

Currently there is no way to tell when ST exits: https://github.com/SublimeTextIssues/Core/issues/10

The reason why on_load isn't called for remembered tabs when ST loads is because your plugin hasn't loaded yet. You can use the plugin_loaded method to tell when your plugin has loaded and then manually cycle through all windows and all views, but this will also be executed when your plugin is updated, so you may want to think about how best to work around that.

Upvotes: 2

Related Questions