I’m trying to recreate functionality that I really like on PHPStorm that goes like this:
- When the sidebar is closed,
super+b
opens and focuses the sidebar - When the sidebar is open and focused, that same
super+b
closes the sidebar and returns the focus to the current page
The following custom bindings work to open and focus the sidebar, but I’m having trouble getting that same binding to close it and return focus to the file once open:
// toggle and focus sidebar
{ "keys": ["super+b"], "command": "chain", "args": {
"commands": [
["toggle_side_bar"],
["focus_side_bar"]
]},
"context": [
{"key": "panel_has_focus", "operator": "not_equal"}
]
},