lyokha / vim-xkbswitch

vim plugin for automatic keyboard layout switching in insert mode
MIT License
481 stars 23 forks source link

Windows 10, gvim/nvim-qt, stopped working - how to debug/diagnose? #49

Closed bybor closed 3 years ago

bybor commented 3 years ago

Hi.

It stopped working few days ago and I don't know why. En/Ru layouts, Alt-Shift to switch between them. Steps to reproduce:

I did plugins update around that time, so I rolled back to 0.15, but it didn't help.

I have Bitdefender Security Endpoint Antivirus software and it caused issues for me in the past with other software, like blocking silver searcher. I can imagine that it somehow prevents DLL to do layout switch.

Could you tell if there is a way to debug/diagnose what happens?

Thank you!

lyokha commented 3 years ago

Hi. I guess that the OS library that you are using as g:XkbSwitchLib should be checked first, not sure how to do this under Windows though.

Check also what prints

:echo &buftype

(it should print empty line in normal buffers). If buftype is nofile, the plugin is not enabled.

bybor commented 3 years ago

Regarding nofile, that was the reason I reverted back to 1.5 - I thought it's the reason. I get empty line when running this command, so it's not related.

I'll close this comment then, because I'm 99% sure that it's "only for me".

But I have one more question. In Windows you can have key combination to switch to specific layout - like ctrl+shift+1 for Russian. Will it be handled by xkbswitch / does it matter how the layout was changed?

lyokha commented 3 years ago

Regarding nofile, that was the reason I reverted back to 1.5 - I thought it's the reason. I get empty line when running this command, so it's not related.

Thanks for checking this! I did not think that this could be the cause of the issue, but anyway this problem was a good reason to check this.

I'll close this comment then, because I'm 99% sure that it's "only for me".

But I have one more question. In Windows you can have key combination to switch to specific layout - like ctrl+shift+1 for Russian. Will it be handled by xkbswitch / does it matter how the layout was changed?

This depends solely on the underlying switcher library. I cannot say surely for the Windows library you are using, but at least xkb-switch and g3kb-switch used in Linux, as well as the plugin vim-xkbswitch itself have nothing to do with key bindings, instead they use system API functions.