Sublime Forum

Set console to open at startup?

#1

Is there a way to have the console open as the app starts?

0 Likes

#2

There’s not a setting to allow that, but there is a command that you can use to open the panel, so you can create a plugin that invokes that command when it’s loaded, which will have the same effect.

For example, you can select Tools > Developer > New Plugin... to create a new stub plugin, then replace the default code with the following code and save it in the default location that Sublime will offer (your User package) with a descriptive name like open_console_on_startup.py:

import sublime
import sublime_plugin

def plugin_loaded():
    sublime.active_window().run_command("show_panel", {"panel": "console"})

plugin_loaded() gets invoked whenever the plugin loads, which includes when you make changes to the file (so when you hit save it will happen immediately) and when Sublime starts up.

Note however that for speed reasons Sublime starts up and restores the session without waiting for all of the plugins to load, so that you can get working faster. As a result there will be a bit of a delay between when the Sublime window appears and when the console opens. The length of the delay will depend on how many packages you have installed.

0 Likes

#3

Great - thank you - it worked, and I learned something!!

0 Likes