Skip to content

Fix switching between helix and vim modes to not require returning to non-modal in between#51706

Merged
dinocosta merged 4 commits intozed-industries:mainfrom
feitreim:bugfix-swap-btwn-vim-and-helix
Mar 24, 2026
Merged

Fix switching between helix and vim modes to not require returning to non-modal in between#51706
dinocosta merged 4 commits intozed-industries:mainfrom
feitreim:bugfix-swap-btwn-vim-and-helix

Conversation

@feitreim
Copy link
Copy Markdown
Contributor

@feitreim feitreim commented Mar 16, 2026

Closes #51704

Previously it took three inputs of workspace: toggle vim mode to switch from helix mode back to vim mode and three inputs of workspace: toggle helix mode to switch to helix mode from vim mode.

Now it takes only one, when the setting is updated, the editor needs to be deactivated and reactivated, this won't cause performance issues because this is not a code path that people hit frequently, if it all. The only reason I hit it so much is contributing to zed and fixing helix mode issues as a vim mode user.

Before:

oldbehavior.mov

After:

Screen.Recording.2026-03-16.at.4.32.42.PM.mov

Before you mark this PR as ready for review, make sure that you have:

  • Added a solid test coverage and/or screenshots from doing manual testing
  • Done a self-review taking into account security and performance aspects
  • Aligned any UI changes with the UI checklist

Release Notes:

  • Fixed switching between vim and helix mode needing multiple calls to have an effect while an editor is already open
  • Update Settings UI such that, enabling vim or helix mode, now disables the other if it was previously active

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 16, 2026
@maxdeviant maxdeviant changed the title Helix/Vim: Fix switching between helix and vim modes to not require returning to non-modal inbetween. Fix switching between helix and vim modes to not require returning to non-modal in between Mar 16, 2026
@dinocosta dinocosta added the guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions label Mar 17, 2026
Introduce `settings_ui::page_data::write_vim_mode` and
`settings_ui::page_data::write_helix_mode` functions which ensure that,
when one of these modes is being enabled, if the other is set and also
enabled, it disables it.

This ensures that, in the Settings UI, toggling either vim mode or helix
mode will disable helix mode or vim mode, respectively.
Copy link
Copy Markdown
Member

@dinocosta dinocosta left a comment

Choose a reason for hiding this comment

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

Thanks @feitreim! 🙂

I've also pushed a commit updating the Settings UI such that, enabling one of the modes disables the other, in case it is set.

@feitreim
Copy link
Copy Markdown
Contributor Author

@dinocosta Thanks! this drives me insane!

@dinocosta dinocosta merged commit bf92d19 into zed-industries:main Mar 24, 2026
33 checks passed
@feitreim feitreim deleted the bugfix-swap-btwn-vim-and-helix branch March 24, 2026 22:49
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 guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switching between vim mode and helix mode doesn't work properly

3 participants