-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vim] I set it to do escape when I press jk, but it doesn't work when I press jk during auto completion. #8729
Comments
"bindings": { "j k": "vim::NormalBefore" // remap jk in insert mode to escape.} |
In your context you have I think you need: Getting the contexts right in the keybindings file is a known problem right now, so help clarifying the documentation is much appreciated. |
It works fine, thank you. {
"context": "Editor && vim_mode == insert && !menu",
"bindings": {
// put key-bindings here if you want them to work in insert mode
// ~~~~~~ Insert Mode
"j k": ["vim::SwitchMode", "Normal"]
}
},
{
"context": "Editor && vim_mode == insert && menu",
"bindings": {
// put key-bindings here if you want them to work in insert mode
// ~~~~~~ Insert Mode
"j k": ["vim::SwitchMode", "Normal"]
}
}, |
[
{
"context": "Editor && VimControl && !VimWaiting && !menu",
"bindings": {
// put key-bindings here if you want them to work in normal & visual mode
}
},
{
"context": "Editor && vim_mode == normal && !VimWaiting && !menu",
"bindings": {
// put key-bindings here if you want them to work only in normal mode
// ~~~~~~~ Normal Mode
// Doc hover
"K": "editor::Hover",
// buffer :bn :bp
"L": "pane::ActivateNextItem",
"H": "pane::ActivatePrevItem",
// quick fix
"space g a": "editor::ToggleCodeActions",
"] d": "editor::GoToDiagnostic",
"[ d": "editor::GoToPrevDiagnostic",
"g m": "editor::ExpandMacroRecursively",
// LSP rename "ga" multi cursor
"space r": "editor::Rename",
// symbol search "gs"
"space o": "project_symbols::Toggle",
// NERDTree
"space e": "project_panel::ToggleFocus",
"space x": "workspace::CloseAllDocks",
// Terminal Pannel(shell)
"space s h": "terminal_panel::ToggleFocus",
// trouble toggle
"space t": "diagnostics::Deploy"
}
},
{
"context": "Editor && vim_mode == visual && !VimWaiting && !menu",
"bindings": {
// visual, visual line & visual block modes
// ~~~~~~ Visual Mode
"K": "editor::MoveLineUp",
"J": "editor::MoveLineDown",
"space g c": "editor::ToggleComments"
}
},
{
"context": "Editor && vim_mode == insert && !menu",
"bindings": {
// put key-bindings here if you want them to work in insert mode
// ~~~~~~ Insert Mode
"j k": ["vim::SwitchMode", "Normal"]
}
},
{
"context": "Editor && vim_mode == insert && menu",
"bindings": {
// put key-bindings here if you want them to work in insert mode
// ~~~~~~ Insert Mode
"j k": ["vim::SwitchMode", "Normal"]
}
},
{
"context": "ProjectPanel",
"bindings": {
"h": "project_panel::CollapseSelectedEntry",
"l": "project_panel::ExpandSelectedEntry",
"j": "menu::SelectNext",
"k": "menu::SelectPrev",
"o": "menu::Confirm",
"r": "project_panel::Rename",
"z c": "project_panel::CollapseSelectedEntry",
"z o": "project_panel::ExpandSelectedEntry",
"shift-o": "project_panel::RevealInFinder",
"x": "project_panel::Cut",
"c": "project_panel::Copy",
"p": "project_panel::Paste",
"d": "project_panel::Delete",
"a": "project_panel::NewFile",
"shift-a": "project_panel::NewDirectory",
"shift-y": "project_panel::CopyRelativePath",
"g y": "project_panel::CopyPath"
}
}
] |
Check for existing issues
Describe the bug / provide steps to reproduce it
I set it to do escape when I press jk, but it doesn't work when I press jk during auto completion.
Environment
Zed: v0.124.8 (Zed)
OS: macOS 14.2.1 23C71 arm64
Memory: 16 GiB
Architecture: aarch64(M1 macPro)
If applicable, add mockups / screenshots to help explain present your vision of the feature
Screen.Recording.2024-03-03.at.7.29.13.AM.mov
Screen.Recording.2024-03-03.at.7.30.55.AM.mov
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.If you only need the most recent lines, you can run the
zed: open log
command palette action to see the last 1000.No response
The text was updated successfully, but these errors were encountered: