Sublime Forum

Conditional commands?

#1

i would like to define a key for “reveal_in_side_bar” - but if the sidebar is open already and the file is already marked, then the sidebar should be hidden.
Is this possible - how would be this possible?

BTW: is there a “official” place where i can find all avaliable commands? Because i have not found “reveal_in_side_bar” on sublimetext.com but on a blog of some random guy :expressionless:

0 Likes

#2

You can add contexts to keybindings to make it conditional, but I don’t think you can make query which file is selected in the side bar, but maybe whether the sidebar is visible.

The available command differ, because if you install packages they ship new commands with them. However you can use the PackageDev package, which will add an autocompletion containing all installed commands. If a predefined command is missing you can create an issue there.

2 Likes

#3

This reference is pretty comprehensive.

2 Likes