I think this is what you want:
import sublime
import sublime_plugin
class ExecOutputFocusCommand(sublime_plugin.WindowCommand):
def run(self):
self.window.run_command('show_panel', args={'panel': 'output.exec'})
In fact, you can just make a key-binding for this. Go to Preferences -> Key Bindings and add the following in the right file (your user keybindings):
[
{
"keys": ["super+shift+v"],
"command": "show_panel",
"args":
{
"panel": "output.exec"
}
}
]
“super” is macOS-specific, you can of course use any sort of key combination.
I found this by opening the Python console (with “ctrl” + “~”) and typing
sublime.log_commands(True)
This will print all the sublime commands to the console as you execute them. When I click on Tools -> Build Results -> Show Build Results, the show_panel
command popped up in the console.