This is a partially tested solution:
Create a xxx.sublime-build file with a custom target command:
{
"target": "oracle_execute_list",
"selector": "source.plsql.oracle"
}
Create a plugin with your command that show a list of choice and call another command with the choice as argument (or directly call the exec command, see after):
[code]import sublime, sublime_plugin
class OracleExecuteListCommand(sublime_plugin.WindowCommand):
instance_list = “DEVELOP/DEVELOP@DEV1252A”, “PCS/PCS@DEV1252A”, “DEMO_MAS_F/DEMO_MAS_F@T1002U”]
def run(self, *args, **kwargs):
print args, kwargs
self.window.show_quick_panel(self.instance_list , self._quick_panel_callback)
def _quick_panel_callback(self, index):
if (index > -1):
self.window.run_command("oracle_exec", {"dsn": self.instance_list[index]})
[/code]
This part is not tested cos my oracle_exec command is not relevant for you.
Create a command that run the build command (look at exec.py for arguments description), something like that:
[code]import sublime, sublime_plugin
class OracleExecCommand(sublime_plugin.WindowCommand):
def run(self, dsn):
cmd = “sqlplus.exe”, “-s”, dsn, “@”, sublime.packages_path()+"\RunSQL.sql", self.window.active_view().file_name()]
file_regex = “^\(.+?/([0-9]+):([0-9]+)\) [0-9]+:[0-9]+ (.+)$”
self.window.run_command("exec", {"cmd": cmd, "file_regex": file_regex})
[/code]
Good luck!