Skip to content
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

IME Japanese input mode is turned off when a specific key is entered #338

Open
yoshida-m-3 opened this issue Sep 20, 2021 · 5 comments
Open

Comments

@yoshida-m-3
Copy link

yoshida-m-3 commented Sep 20, 2021

Entering the backspace or enter key turns off IME Japanese input.
The problem is limited to countries such as Asia that need to switch languages.

Is it possible to prevent IME Japanese input from being turned off due to unintended movement?

Also, disabling the plugin with <m-p> does not fix the problem.
Removing the plugin itself solves this, but I want to continue using this plugin.

@LunarWatcher
Copy link

Possibly related to #334

What key causes the conflict?

@yoshida-m-3
Copy link
Author

yoshida-m-3 commented Sep 20, 2021

The two keys I'm seeing the problem with are backspace and enter.

You can see how the IME display at the bottom right switches without permission.
Display A when IME mode is OFF
When IME mode is ON, is displayed.

Video.mov

@LunarWatcher
Copy link

For good measure, can you let g:AutoPairsMapBS = 0 and check if Japanese mode still gets turned off when you press backspace? I don't understand what could cause this - auto-pairs shouldn't emit anything that leaves Vim. What keybind do you use to switch to and from Japanese mode?

@yoshida-m-3
Copy link
Author

Setting let g: AutoPairsMapBS = 0 no longer turns off the IME when pressing Backspace.

I'm sorry, and I noticed.
I have defined a command in autocmd to turn off IME on InsertLeave.
In the Japanese input environment, it is often customary to turn off the IME automatically.

@LunarWatcher
Copy link

Ahh, that explains it. <CR> directly uses escape. Not sure why backspace is triggered though, there's no escape involved there.

At worst, I can add a variable to keep track of "fake" normal mode (i.e. when normal mode is caused by the plugin temporarily). I've just found out about <C-c> though (https://vi.stackexchange.com/a/27196/21251), but that might not be recommended. I need to do some further research into this, but if I can find a way to exit insert mode in the mappings that doesn't trigger InsertLeave, I can fix this properly. Got no timeline on this though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants