Skip to content

Instantly share code, notes, and snippets.

@jeffbski
Last active September 4, 2025 12:04
Show Gist options
  • Select an option

  • Save jeffbski/339ca2a0ba91a15190ef15beb7050326 to your computer and use it in GitHub Desktop.

Select an option

Save jeffbski/339ca2a0ba91a15190ef15beb7050326 to your computer and use it in GitHub Desktop.
Zed add missing Helix keybindings to Zed Helix Mode - Zed version: 0.201.9
// Zed keymap
//
// For the default binding keys, see the Zed
// documentation: https://zed.dev/docs/key-bindings
//
// To see the "default" key bindings run `zed: open default keymap` from the
// "command" palette.
[
{
"context": "vim_mode == normal && !menu",
"bindings": {
"m d": "vim::PushDeleteSurrounds",
"m r": "vim::PushChangeSurrounds"
}
},
{
"context": "(vim_mode == normal || vim_mode == helix_normal) && !menu",
"bindings": {
"space b": "tab_switcher::Toggle", // list
"space /": "pane::DeploySearch", // search all files
// Since zed doesn't have helix jump word, I am using closes thing vim::PushSneak
"g w": "vim::PushSneak",
"g W": "vim::PushSneakBackward",
"m i w": ["workspace::SendKeystrokes", "v i w"],
"r": ["workspace::SendKeystrokes", "v r"] // leaves in vim normal
}
},
{
"context": "vim_mode == helix_normal && !menu",
"bindings": {
// "m d": "vim::PushDeleteSurrounds", // this should work but doesn't from helix_normal, only vim normal
"m d": ["workspace::SendKeystrokes", "v v d s"], // hack, v v toggles visual and back to vim normal, so d s will work
// "m r": "vim::PushChangeSurrounds", // this should work but doesn't from helix_normal, only vim normal
"m r": ["workspace::SendKeystrokes", "v v c s"] // hack, v v toggles visual and back to vim normal, so c s will work
}
},
{
"context": "Editor && VimControl && vim_mode == visual && !VimWaiting && !menu",
"bindings": {
"g l": ["editor::SelectToEndOfLine", { "stop_at_soft_wraps": false }] // vgl v g l - visual select to end of line
}
},
{
"context": "vim_mode == visual && !menu",
"bindings": {}
},
{
"context": "Editor && VimControl && (vim_mode == helix_normal || vim_mode == visual) && !VimWaiting && !menu",
"bindings": {
"space R": "vim::Paste", // replaces selection with clipboard (sames as just p or P)
"m s": "vim::PushAddSurrounds" // leaves in vim normal
}
}
]
{
"base_keymap": "VSCode",
"helix_mode": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment