Vim mode for file explorer #6596
Replies: 7 comments
|
I am also a vscode nvim user, and I mapped some keys myself. FYI:
[
{
"context": "Editor && VimControl && !VimWaiting && !menu",
"bindings": {
"space n": "workspace::ToggleLeftDock",
"-": "project_panel::ToggleFocus",
"ctrl-h": ["workspace::ActivatePaneInDirection", "Left"],
"ctrl-l": ["workspace::ActivatePaneInDirection", "Right"],
"ctrl-k": ["workspace::ActivatePaneInDirection", "Up"],
"ctrl-j": ["workspace::ActivatePaneInDirection", "Down"]
}
},
{
"context": "ProjectPanel && not_editing",
"bindings": {
// https://github.com/zed-industries/zed/issues/4753
// https://github.com/zed-industries/zed/issues/4270
"escape": "project_panel::ToggleFocus",
"enter": "project_panel::Open",
"o": "project_panel::NewDirectory",
"a": "project_panel::NewFile",
"r": "project_panel::Rename",
"x": "project_panel::Cut",
"y": "project_panel::Copy",
"p": "project_panel::Paste",
"d": "project_panel::Delete",
// Directory expansion
"l": "project_panel::ExpandSelectedEntry",
"h": "project_panel::CollapseSelectedEntry",
// Move up and down
"j": "menu::SelectNext",
"k": "menu::SelectPrev"
// "shift-d": "project_panel::Delete"
}
}
] |
|
I agree, I would really like to be able to use |
|
I don't really use the project panel, but fwiw most of this stuff is in the default vim keymap at this point. You can view it via the command palette with {
// netrw compatibility
"context": "ProjectPanel && not_editing",
"bindings": {
":": "command_palette::Toggle",
"%": "project_panel::NewFile",
"/": "project_panel::NewSearchInDirectory",
"d": "project_panel::NewDirectory",
"enter": "project_panel::OpenPermanent",
"escape": "project_panel::ToggleFocus",
"h": "project_panel::CollapseSelectedEntry",
"j": "menu::SelectNext",
"k": "menu::SelectPrev",
"l": "project_panel::ExpandSelectedEntry",
"o": "project_panel::OpenPermanent",
"shift-d": "project_panel::Delete",
"shift-r": "project_panel::Rename",
"t": "project_panel::OpenPermanent",
"v": "project_panel::OpenPermanent",
"p": "project_panel::Open",
"x": "project_panel::RevealInFileManager",
"s": "project_panel::OpenWithSystem",
"] c": "project_panel::SelectNextGitEntry",
"[ c": "project_panel::SelectPrevGitEntry",
"] d": "project_panel::SelectNextDiagnostic",
"[ d": "project_panel::SelectPrevDiagnostic",
"}": "project_panel::SelectNextDirectory",
"{": "project_panel::SelectPrevDirectory",
"shift-g": "menu::SelectLast",
"g g": "menu::SelectFirst",
"-": "project_panel::SelectParent",
"ctrl-6": "pane::AlternateFile"
}
}, |
|
I really like to use ctrl-u ctrl-d for file navigation, but I couldn't find a way to make it work. Does anyone have a solution? Actual behaviour: Screen.Recording.2025-04-19.at.10.11.26.movHow I would like it to work: Screen.Recording.2025-04-19.at.10.12.41.mov |
|
This now seems to work in the latest version. |
|
Thanks for reaching out. We want to better support our community, and the best way for us to do that is through our official Discord. The team is active there and happy to help. We’re closing the “Help and General Q&A” category on GitHub Discussions and directing all support questions to Discord going forward. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I use a combination of nvim and vscode but would really like to switch to Zed.
I frequently use Vim keybindings to navigate the file directory in both nvim (using
nvim tree) and in vs code (using thevscodevimvim extension).jfor down,kfor up,lto expand director,hto collapse./should allow you to search for a file or directory.Without vim navigation in the file directory pane, half of my vim workflow is gone, preventing me from switching to Zed.
Is that functionality already supported (I see arrow keys are supported)? If not, any plans to support it?
All reactions