sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
811 stars 39 forks source link

Allow plugins to run commands on selected files through keybindings when the sidebar has focus #4133

Open AmjadHD opened 3 years ago

AmjadHD commented 3 years ago

Problem description

Sublime text supports triggering commands on sidebar's selected files (or folders), but only after opening the sidebar's context menu.

Preferred solution

Allow plugins to run commands on selected files directly through keybindings when the sidebar has focus, instead of through the context menu. One can delete, rename, move, ... through shortcuts, this will make interactions with the sidebar easier and not flow-breaking.

Alternatives

Allow triggering the sidebar's context menu through keyboard when it's focused.

Additional Information (optional)

There needs to be a sidebar_has_focus context, to be used in keybindings, and preferably a highlighted attribute for sidebar_container in themes. related #867

AmjadHD commented 2 years ago

preferably a highlighted attribute for sidebar_container in themes.

3900

timfjord commented 2 years ago

I think there is another, more fundamental issue Currently, bindings that expect paths arg to be passed(for example rename_path) don't work if they are triggered from the sidebar So it is simply impossible to define a key binding to, say, rename a focus item in the sidebar

So even if we have a context, the command itself won't work

AmjadHD commented 3 months ago

Allow triggering the sidebar's context menu through keyboard when it's focused.

Implemented in v4180.