As title say.
Background: the following code does not hide the sidebar because self.view.window().run_command(“focus_side_bar”) is nullified by the fact that sidebar is already visible and focused:
[code]import sublime, sublime_plugin
class toggle_sidebar(sublime_plugin.TextCommand):
def run(self, edit):
self.view.window().run_command(“toggle_side_bar”)
self.view.window().run_command(“focus_side_bar”)[/code]
So, I need to check sidebar visibility & focus status to decide whether to run focus_side_bar command