Sublime Forum

API method to show the console

#1

Hi All,

New to sublime, just bought it the other day, and am loving it. Nice work Jon! Especially love I can put it on all three OS’s that I have at home… heh.

I’ve been building a few simple plugins for my own use, and one thing I can’t seem to find in the api reference is the ability to show|hide the console from the plugin. Would this be a goofy idea? I’ve tried using the show_quick_panel, and it’s pretty cool, but more complex than what I need at the moment. It would be nice to be able to pop up the console if my plugin has something to show me…

Cheers from Brissie.

0 Likes

#2

If you turn on Sublime’s logging of commands

sublime.log_commands(True)

And then show and hide the console, you will see the show console command appear in the logging on the console. It shows this:

show_panel {"panel": "console", "toggle": true}

So, I would assume it to be a window command; so this should work:

sublime.active_window().run_command("show_panel", {"panel": "console", "toggle": True})
0 Likes

#3

Awesome, that was perfect. Thanks facelessuser.

0 Likes