-
Notifications
You must be signed in to change notification settings - Fork 29.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vim extension issue with Chinese IME #8133
Comments
The reason this issue comes with Vim extensions is because Vim needs to monitor user's keyboard input and all these extensions are listening to Let's say users want to type in a Chinese word So ideally, if users type |
Hope this can fix soon, it's terrible for Chinese (reference above) |
+1 |
vimStyle works with Chinese VSC: 1.3.0 Tested with Default Zhuyin IM & Squirrel IM |
@Yukaii are you saying Chinese works perfectly using vimStyle even with steps I mentioned above? Not sure if I set up wrong things, but I just installed latest version of vimStyle and tried to type |
@localvar @rebornix I am sorry my VIM sample contained a typo that was causing IME to fail when in insert/append mode: See alexdima/vscode-vim@708d4c0 After that change here is IME in insert mode with my VIM sample: Please note that his works by overwriting the built-in command |
Please also note that my sample does not support IME building in normal mode because I am lazy and didn't do it, but not because it could not be possible. |
Also, possible causes for different behaviour in 1.2.1 could be the PR #5615 -- but IMHO the PR is quite good. |
@rebornix you're right, I found Pinyin IM breaks normal mode as you described, Zhuyin IM also has some problems: I input "可動" these two word in normal mode and it insert correctly, but when I only type one Zhuyin phonetic character "ㄎ", and press enter, it replace first word "可". |
@alexandrudima oh man, you helped all Chinese Vim users out. |
@alexandrudima played with this API and I found that current information is not enough yet. A really simple example: First, below is what will happen when we use Vim with English IME
Then use Chinese IME
Here comes the problem, since we are using Chinese IME, this Another funny example with Chinese IME is
If we type
You may already see the problem, when we get the Personally I think it's not a good idea to detect IME info ourselves because we will end up moving the same logic of VS Code to the extension. |
I will investigate further in our code-base, but beware that we don't have any input building (IME) logic either, Chrome does that. We take the "lower-level" events:
We then do quite some computation to eliminate the text we have previously placed in the So far I have found that these two primitives: I will investigate if we can enrich |
Here is an example how to use the new The idea is you can overwrite (similar to |
I tried two Vim extensions, amVim and VsCodeVim, both have problems when using Chinese IME:
from the comments of the issues: it is not only affect Windows, but also OSX and Linux; and not only Chinese, but also Japanese.
So, it is highly suspect this is an issue of VSC instead of the extensions.
The text was updated successfully, but these errors were encountered: