Vim mode for file explorer #6596
Replies: 4 comments
-
Same issue for me. Preventing me from switching from vscode |
Beta Was this translation helpful? Give feedback.
-
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"
}
}
] |
Beta Was this translation helpful? Give feedback.
-
I agree, I would really like to be able to use |
Beta Was this translation helpful? Give feedback.
-
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"
}
}, |
Beta Was this translation helpful? Give feedback.
-
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 thevscodevim
vim extension).j
for down,k
for up,l
to expand director,h
to 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?
Beta Was this translation helpful? Give feedback.
All reactions