Home Download Buy Blog Forum Support

Event on ST startup

Event on ST startup

Postby andershqst on Fri Apr 26, 2013 10:57 am

Hi everyone,

Just joined the forum. I am in a team working on a collaborative editing plugin for ST2, that will work as a cloud solution. Much like google docs, but in ST and with nothing persisted in the cloud.

Question:
Is there a way that I can receive an event, or run a command, when ST2 has just been launched?

Thanks
Anders
andershqst
 
Posts: 6
Joined: Fri Apr 26, 2013 10:35 am

Re: Event on ST startup

Postby Grant on Fri Apr 26, 2013 1:01 pm

How about when your plugin is loaded?
Grant
 
Posts: 68
Joined: Fri Jan 20, 2012 2:42 pm

Re: Event on ST startup

Postby andershqst on Fri Apr 26, 2013 1:47 pm

That sounds right, but I can not see a method for that in the api..?
andershqst
 
Posts: 6
Joined: Fri Apr 26, 2013 10:35 am

Re: Event on ST startup

Postby adzenith on Fri Apr 26, 2013 4:27 pm

adzenith
 
Posts: 1217
Joined: Mon Oct 19, 2009 9:12 pm

Re: Event on ST startup

Postby andershqst on Fri Apr 26, 2013 7:28 pm

Thanks, but it is for sublime text 2 where plugin_loaded() does not seem to be supported.
andershqst
 
Posts: 6
Joined: Fri Apr 26, 2013 10:35 am

Re: Event on ST startup

Postby adzenith on Fri Apr 26, 2013 7:58 pm

You can also just run code in your plugin... it'll get executed when Sublime loads the plugin.
adzenith
 
Posts: 1217
Joined: Mon Oct 19, 2009 9:12 pm

Re: Event on ST startup

Postby andershqst on Fri May 10, 2013 5:46 pm

Thanks. That was what I ended up doing, and it works at desired.

Cheers
andershqst
 
Posts: 6
Joined: Fri Apr 26, 2013 10:35 am


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 8 guests