Sublime Forum

Harness other installed packages

#1

Hello,

I’m thinking of extending the STProjectMaker plugin to run a series of actions once it’s finished creating a project. For instance, syncing with an FTP server.

I was wondering if there was a way that I could harness other packages that are installed, for instance SFTP. So I could run it’s sftp_sync_down method etc.

I couldn’t find any information on this, or any other topics asking the same question, so I apologise if this has been asked frequently!

Thank you,

Chris Neal

0 Likes

#2

If the Package is installed then

self.view.run_command("sftp_sync_down")

or similar should work I believe.

If it’s not installed then you might use some error-handling, but I assume there is a way to first confirm that it is installed(?) before attempting to run it.

Added: Check first if the method is a Text or WindowCommand - then it will be called on either a View or Window object, etc.

0 Likes