Skip to content

Unexpected keymap befaviour in vim mode (exit insert mode on 'jk' 'jj') #14725

Closed
@vybukhivka

Description

@vybukhivka

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

I've been using neovim for a while, and get used to exit insert mode on 'j k' keymap. So this was the first thing I setup in zed, but I met a problem here. Typing 'j' in insert mode makes zed waiting for me to continue the keymap, without adding 'j' to the file, which is important. I would like zed to behave like vim here, vim also waits for me to execute the keymap, but it adds a character i pressed to the editor as well + it will remove last 'j' i typed before 'j k'. for example: when i type "hjjk" i expect to have 'hj' added to file and exit insert mode

here is the recoding of me typing "hjjjj" + jk in neovim and zed.

in bottom right corner of zed you can see 'jjjj' next to the -- INSERT -- when i type

keymap.json:
{ "context": "Editor && vim_mode == insert && !menu", "bindings": { "j k": ["vim::SwitchMode", "Normal"] } },

Environment

Zed: 0.144.3
OS: Sonoma 14.4.1
Memory: 16gb
Architecture: apple silicon (m1 macbook pro)

If applicable, add mockups / screenshots to help explain present your vision of the feature

Screen_Recording_2024-07-18_at_10.44.55.mov

If applicable, attach your Zed.log file to this issue.

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug[core label]vim

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions