# ui: Fix Vim mode detection in keybinding to text helpers \(\#38971\) · gitcafe/zed

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

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

Visibility: public

Requested revision: a55dff78342cff9a0cf18e283b3a5b78846c82de

Requested commit: a55dff78342cff9a0cf18e283b3a5b78846c82de

Commit: a55dff78342cff9a0cf18e283b3a5b78846c82de

Tree: 1d01c057e9faf9c20ae6db2d4d98619607f5ab99

Author: Bartosz Kaszubowski

Committer: GitHub

## Message

```
ui: Fix Vim mode detection in keybinding to text helpers (#38971)

# Why

Refs:
* #38969

When working on the PR above I have spotted that keybinding to text
helpers incorrectly detects if Vim mode is enabled.

# How

Replace inline check with an existing `KeyBinding::is_vim_mode` method
in keybinding text helpers.

Release Notes:

- Fixed incorrect Vim mode detection in UI keybinding to text helpers.

# Test plan

Made sure that when Vim mode is not specified in settings file it
resolves to `false`, and correct keybindings are displayed, than I have
added the `"vim_mode": true,` line to my settings file and made sure
that keybindings text have changed accordingly.

### Before

<img width="712" height="264" alt="Screenshot 2025-09-26 at 16 57 08"
src="https://github.com/user-attachments/assets/62bc24bd-c335-420f-9c2e-3690031518c1"
/>

### After

<img width="712" height="264" alt="Screenshot 2025-09-26 at 17 13 50"
src="https://github.com/user-attachments/assets/e0088897-eb6b-4d7b-855a-931adcc15fe8"
/>
```

## Parents

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

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