Sublime Forum

Sidebar hide/show

#1

Hi,
I tried to create a plugin to open a new window with the sidebar visible but except toggle_sidebar I found nothing…
Is there a way to either detect if the sidebar is visible to “toggle” it if needed or directly call a command to show/hide it ?

I also have another related question:
I usually hide the sidebar when I am working on my projects but I would like to have the sidebar visible when I open a folder from the command line, is there a way to do so ?

0 Likes

#2
sublime.active_window().run_command('toggle_side_bar')
0 Likes

#3

As I said I am looking for something which can hide or show the sidebar without knowing its current state or a way to find its current state so I can use toggle to hide/show it.
I don’t want to toggle the sidebar I want to specifically hide OR show it as I want.

0 Likes

#4

You can try my script github.com/reu-res/ST2Assistant

0 Likes

#5

Nice solution if it works :smile:
I will give it a try, thanks.

0 Likes