mirror of
https://github.com/zed-industries/zed.git
synced 2026-07-09 16:00:35 +00:00
## Summary Add a chevron (`Disclosure`) to each file group header in Text Finder, letting you fold/unfold that file's matches. Fold state is cleared whenever a new search starts. ## Test plan - [x] Open Text Finder, run a search with matches in multiple files - [x] Click a header's chevron, confirm its matches hide/show and selection lands on a visible row - [x] Start a new search, confirm folded state doesn't carry over Release Notes: - Added the ability to collapse per-file match groups in Text Finder --------- Co-authored-by: ozacod <ozacod@users.noreply.github.com> Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
47 lines
1.6 KiB
JSON
47 lines
1.6 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",
|
|
},
|
|
},
|
|
{
|
|
"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",
|
|
"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",
|
|
"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",
|
|
},
|
|
},
|
|
]
|