mirror of
https://github.com/zed-industries/zed.git
synced 2026-07-09 16:00:35 +00:00
# Objective The objective is to improve Helix's default keymap within Zed as a few are still missing. These are all [default keymaps](https://docs.helix-editor.com/keymap.html) i was using within Helix but dissapointed they weren't working in Zed There's more info in [Are we Helix yet?](https://github.com/zed-industries/zed/discussions/33580#top) ## Solution - Add `] g` and `[ g` for hunk navigation in helix mode, in helix this is go to next/previous change which maps nicely to Zed's go to next/previous hunk. (it was set to `c` here but this is incorrect and doesn't match Helix's keymap. - Add `alt-b` and `alt-e` for larger syntax node navigation in helix mode, i use this a few times to go to the top of a function within the body and Zed doesn't have it mapped. - Add `] space` and `[ space` for inserting empty lines in helix mode. This one was incorrectly implemented previously, after the `space` Zed is waiting for input. It needs to be a direct chord added rather than on `helix_next` mode. - This means the space binding from the helix_next operator context is redundant, so ive removed it - Add `*` to use selection for find in helix mode. Helix mode is slightly different and doesn't "go to next" on `*`, instead that becomes the `/` register. This is pretty fundamental to helix navigation so should be ported to Zed also. - Move `] d` and `[ d` diagnostics navigation into helix_normal context. Vim was already using this one but it wasn't shared with Helix. I've moved it to the shared Vim and Helix block. ## Testing I've tested these changes with a local build and each one works as expected ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - Added `alt-b`/`alt-e` in Helix mode to move to the start/end of the larger syntax node. - Added `*` in Helix mode to set the current selection for search. - Fixed Helix `[`/`]` navigation so `c` goes to the previous/next comment and `g` to the previous/next hunk, and single-key follow-ups like `g` no longer hang. --------- Co-authored-by: dino <dinojoaocosta@gmail.com> |
||
|---|---|---|
| .. | ||
| badge | ||
| fonts | ||
| icons | ||
| images | ||
| keymaps | ||
| prompts | ||
| settings | ||
| sounds | ||
| themes | ||