Skip to content

Enable Vim/Helix keybindings when the base keymap is set to None#54899

Merged
NeelChotai merged 1 commit intozed-industries:mainfrom
profojak:main
Apr 27, 2026
Merged

Enable Vim/Helix keybindings when the base keymap is set to None#54899
NeelChotai merged 1 commit intozed-industries:mainfrom
profojak:main

Conversation

@profojak
Copy link
Copy Markdown
Contributor

Hi! 👋 When base_keymap is set to None, it disables all the keybindings, even if vim_mode or helix_mode is enabled. However, I think the Vim/Helix keybindings should be applied on top of the empty base keymap.

My use case for this is to start with the minimal set of Vim/Helix key shortcuts and add other bindings on top of that, instead of flooding the keymap with hundreds of predefined shortcuts from some base keymap.

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 25, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @profojak on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@zed-community-bot zed-community-bot Bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Apr 25, 2026
@profojak
Copy link
Copy Markdown
Contributor Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Apr 26, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 26, 2026

The cla-bot has been summoned, and re-checked this pull request!

@zed-industries-bot
Copy link
Copy Markdown
Contributor

Warnings
⚠️

This PR is missing release notes.

Please add a "Release Notes" section that describes the change:

Release Notes:

- Added/Fixed/Improved ...

If your change is not user-facing, you can use "N/A" for the entry:

Release Notes:

- N/A

Generated by 🚫 dangerJS against c24520d

Copy link
Copy Markdown
Member

@NeelChotai NeelChotai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for the contribution!

@NeelChotai NeelChotai enabled auto-merge April 27, 2026 08:49
@NeelChotai NeelChotai added this pull request to the merge queue Apr 27, 2026
Merged via the queue into zed-industries:main with commit db76d15 Apr 27, 2026
41 checks passed
@xab3r
Copy link
Copy Markdown

xab3r commented Apr 29, 2026

I haven't seen this coming. Wouldn't it be more appropriate to add another option like base_keymap: vim/helix or something if someone wants vim/helix keymap as default mapping, and keep base_keymap: None to behave exactly as it says - "no base map"?

@NeelChotai The "None" map was introduced on purpose in #9471 specifically to clear the map entirely. This change is breaking it. Can it be reverted?
cc @ConradIrwin

P.S. My situation is this: the Zed setup is based on a clean base map, and all my keybindings are non-standard. This change introduces many unwanted mappings and makes the setup much harder to maintain.

@ConradIrwin
Copy link
Copy Markdown
Member

Sorry about that, revert is here: #55144

SomeoneToIgnore pushed a commit to polyesterswing/zed that referenced this pull request Apr 29, 2026
…one" (zed-industries#55144)

Reverts zed-industries#54899

Release notes:

- Reverted the "none" keymap to be literally nothing
@profojak
Copy link
Copy Markdown
Contributor Author

Thanks for your feedback @xab3r!

I submitted this pull request because it felt like a bug: you toggle the Vim/Helix mode while having base keymap set to None, and it does literally nothing. From the current UI, I would expect that to apply Vim/Helix key bindings on top of the emtpy base keymap. I did not realize that, in fact, Vim/Helix mode != Vim/Helix key bindings.

I agree a Vim/Helix base keymap is a good compromise, but I think the UI also has to change to communicate this effectively. Imagine you set the keymap to Vim/Helix, but do not really have Vim/Helix behavior, until you also toggle the Vim/Helix mode? To me, from a UI perspective, it makes much more sense to apply Vim/Helix key binds on top of empty base keymap.

I would propose something like Disable all default key binds override toggle instead of relying on the None base keymap to disable key binds, even when Vim/Helix mode is set. Should I open an Issue for this @ConradIrwin?

@ConradIrwin
Copy link
Copy Markdown
Member

@profojak vim/helix mode rely on a number of keybindings from the default keymap; so I think that having none mean none is the right approach.

What are you trying to do?

(In hindsight, I think it was a mistake to allow none at all, but seems like that ship has sailed and people are relying on it).

@profojak
Copy link
Copy Markdown
Contributor Author

@ConradIrwin I wanted to turn off all the key bindings and only enable in-editor Vim/Helix key shortcuts. Setting base keymap to None and enabling Vim/Helix mode kind of implied that to me, in my head. But I can work around this, I actually think having None base keymap is a good thing!

xab3r added a commit to xab3r/zed that referenced this pull request Apr 30, 2026
NeelChotai pushed a commit that referenced this pull request May 4, 2026
…one" (#55144) (cherry-pick to preview) (#55633)

Cherry-pick of #55144 to preview

----
Reverts #54899

Release notes:

- Reverted the "none" keymap to be literally nothing

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
ebaah46 pushed a commit to ebaah46/zed that referenced this pull request May 6, 2026
…-industries#54899)

Hi! 👋 When `base_keymap` is set to `None`, it disables all the
keybindings, even if `vim_mode` or `helix_mode` is enabled. However, I
think the Vim/Helix keybindings should be applied on top of the empty
base keymap.

My use case for this is to start with the minimal set of Vim/Helix key
shortcuts and add other bindings on top of that, instead of flooding the
keymap with hundreds of predefined shortcuts from some base keymap.
ebaah46 pushed a commit to ebaah46/zed that referenced this pull request May 6, 2026
…one" (zed-industries#55144)

Reverts zed-industries#54899

Release notes:

- Reverted the "none" keymap to be literally nothing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants