zed/assets/keymaps/specific-overrides.json
Danilo Leal 90b3aa0b3b
picker: Improve multi-select discoverability and rendering (#60919)
This PR reworks how multi-select mode is rendered in pickers (only used
by the file finder and text finder).

The "Multi Select" entry previously lived inside the footer's Actions
menu, which was hard to discover and its toggle checkmark misaligned the
menu's keybinding column. This PR changes to an icon button at the
far-roght edge of the search editor, with a tooltip showing the
keybinding to toggle it.

Also made each list item use the actual Checkbox component instead of a
bespoke re-implementation of it. And in doing so, added a few design
improvements to the list item so that it received the checkbox while
preserving proper styles for each interaction state, as well as
displaying the keybinding to select the item or check the item.

Here's a quick video, showing these changes off:


https://github.com/user-attachments/assets/e142f7d1-87ba-4258-844b-953ed06237bd

Release Notes:

- Improved multi-select in the file finder and text finder: the toggle
now lives in the search bar with a `cmd-shift-s` keybinding, and
selection checkboxes render inside list items.
2026-07-13 18:21:15 +00:00

50 lines
1.7 KiB
JSON

// Put keybindings bound to a tight specific context that need to overwrite the
// base keymaps here. Only put them here if absolutely needed. In those cases
// also add a comment to the default keymaps that this binding exists here, to
// make it a little more discoverable.
//
// This is loaded after all the base keymaps (Atom, vim etc) but before the user
// keymaps, giving it the highest precedence of all the bindings set by us.
[
{
"context": "Picker > Editor",
"bindings": {
"ctrl-shift-a": "picker::ToggleActionsMenu",
"ctrl-shift-s": "picker::ToggleMultiSelect",
},
},
{
"context": "(Picker && with_preview) > Editor",
"bindings": {
"ctrl-alt-p": "picker::TogglePreview",
"ctrl-alt-right": "picker::SetPreviewRight",
"ctrl-alt-down": "picker::SetPreviewBelow",
"ctrl-alt-up": "picker::SetPreviewHidden",
},
},
{
"context": "FileFinder || (FileFinder > Picker > Editor) || (FileFinder > Picker > menu)",
"bindings": {
"ctrl-shift-p": "file_finder::SelectPrevious",
"tab": "picker::MultiSelectNext",
"ctrl-j": "pane::SplitDown",
"ctrl-k": "pane::SplitUp",
"ctrl-h": "pane::SplitLeft",
"ctrl-l": "pane::SplitRight",
},
},
{
"context": "TextFinder || (TextFinder > Picker > Editor) || (TextFinder > Picker > menu)",
"bindings": {
"ctrl-alt-f": "text_finder::ToProjectSearch",
"tab": "picker::MultiSelectNext",
"ctrl-j": "pane::SplitDown",
"ctrl-k": "pane::SplitUp",
"ctrl-h": "pane::SplitLeft",
"ctrl-l": "pane::SplitRight",
"ctrl-{": "text_finder::Fold",
"ctrl-}": "text_finder::Unfold",
"ctrl-shift-enter": "text_finder::ToggleFoldAll",
},
},
]