# Fix switching between helix and vim modes to not require returning to non-modal in between \(\#51706\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/bf92d19730c061eb5a9fa1985224a0fceb66367a)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: bf92d19730c061eb5a9fa1985224a0fceb66367a

Requested commit: bf92d19730c061eb5a9fa1985224a0fceb66367a

Commit: bf92d19730c061eb5a9fa1985224a0fceb66367a

Tree: a0f47e18d7c4c2067cebd61319881cc7a79f4688

Author: Finn Eitreim

Committer: GitHub

## Message

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

* Update `Vim::register` to correctly re-activate when either `vim_mode`
  or `helix_mode` are enabled, when they were previously disabled.
* Update `settings_ui::page_data::keymap_page` such that, when enabling
  or disabling `vim_mode` or `helix_mode`, the other setting is
  disabled, in case it is set. This ensures that only one mode is
  enabled at a time, as it should be.
  
Closes #51704 

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

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
```

## Parents

- [aca52097616f5fa03b7b1f38a35487fb4794dd00](https://git.cafe/gitcafe/zed/commit/aca52097616f5fa03b7b1f38a35487fb4794dd00?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/bf92d19730c061eb5a9fa1985224a0fceb66367a?format=markdown)
