Keymap takes precedence over input methods(CJK IME)
Summary
Keyboard binding takes precedence over input methods(CJK IME)
(Sorry for my English level)
As a CJK and Vim user, I LOVE zed. But I meet a problem when I just try jj -> escape.
[
{
"context": "vim_mode == insert",
"bindings": {
"j j": "vim::NormalBefore"
}
},
]
As the documents suggests, I use those code for this map. But the keymap take precedence over input methods, and I fail to input some chinese char begin with j.
In normal vim, I can type any Chinese content in insert mode, and all content will be blocked by the input method first, and then converted to Chinese in the input method before being input into the editor (I don't know if this is the case, at least from what I have observed?). You can watch the video below.
https://github.com/user-attachments/assets/8dc6abfb-cdaf-4e3a-a90b-5145792789f5
This is not the case when used in zed. There are many words beginning with j in Chinese, and if they cannot be typed, many people will have a lot of trouble when editing with zed.
https://github.com/user-attachments/assets/2bcc71af-5c03-423c-aae6-26fa600900dc
the chinese typed in video means If you type any other text then it is correct, but if you type (j text not)
I have noticed that there has been some discussion about Chinese input method and vim shortcut, but they are discussing that Chinese input method should not be higher than the shortcut key in normal mode (which is correct, because any Chinese input in normal mode is invalid). So typing directly in English can trigger the shortcut is fine)
Like:
but in insert mode we are typing Chinese, so blocking j is something that bothers me.
Finally, with great respect to all the zed contributors, the editor you designed and developed is really good!
Zed Version and System Specs
Zed: v0.180.2 (Zed) OS: macOS 14.6.1 Memory: 8 GiB Architecture: aarch64