Reputation: 4877
I see a lot of calls to this show_panel
function with an args
object like this:
{
"keys": ["ctrl+shift+f"],
"command": "show_panel",
"args": {"panel": "find_in_files"}
}
I cannot find where the show_panel
function is defined and am beginning to think that it is not exposed. Is it possible to define a new panel?
Upvotes: 5
Views: 1893
Reputation: 4009
Yes. It's possible.
In Sublime Text 2, basically what you need is:
To test, enter lines above one by one on Console View in Sublime:
pt = window.get_output_panel("paneltest")
pt.set_read_only(False)
edit = pt.begin_edit()
pt.insert(edit, pt.size(), "Writing...")
pt.end_edit(edit)
window.run_command("show_panel", {"panel": "output.paneltest"})
In Sublime Text 3, don't execute steps 3 and 5.
Upvotes: 6