sorry, I don’t know if this is a problem at the VIM level, terminal emulator or with KDE.
I'm running vim-gtk3 in Debian Netrunner 20.01 which is KDE, and normally using Konsole, but also Terminator in debugging this, on a Thinkpad T410. I posted over at Netrunner forums, but no interest there.
I’ve been doing the following frequently for the last few months:
In Konsole, I go into VIM (usually through VIFM, but that doesn't seem to matter) and start editing a document. Then I do :new to get another panel, and then :Explore and start editing a second document, switching back and forth between the documents by using c-w (Ctrl-w) twice. Last night, something happened, and now when I press c-w, the first press makes the mouse pointer visible, and the second press makes the vim cursor blink once, but it does not switch panes.
The first time this happened, I did :new, then :Explore, then navigated up, and did /gyatso (a file name) and then I mistyped maybe hitting Ctrl I think, because vim came up with a small panel near the bottom with an error maybe about jump buffer being empty - something being empty anyway. I don’t know whether this typo caused all this, but since this time, I can no longer switch between panels.
Ctrl-W does exist as a KDE shortcut to close applications, but this has not changed. It’s always like that and doesn't normally interfere.
Things I’ve tried:
- Installed Terminator and tried in that, with the same problem, so it’s not just in Konsole
- Renamed the ~/.vim/vimrc
- Purged and reinstalled vim and everything starting with vim-
- Rebooted Netrunner
- Booted into BunsenLabs (another Debian) and in Terminator, using the same ~/.vim/vimrc from Netrunner KDE, it works fine in BunsenLabs.
- showkey gives 29 for Ctrl and 17 for u, which I suppose is correct.
I don’t recall that I did any upgrades in Synaptic, but maybe I did.
Any help or suggestions how to further troubleshoot this, or just a workaround are greatly appreciated.
EDIT 11/2/2020
I created a new user on Netrunner, and vim is working fine there. But can anyone suggest how to know whether the problem is a vim config issue, or something from the OS intercepting the Ctrl-w before vim gets it?
Edit 11/3/2020
Someone told me how to clear up some of the KDE/Konsole stuff. I renamed ~/.config/konsolerc
and also ~/.config/kglobalshortcutsrc
and logged out and back in, but this did not help. It seems like it must be something in vim.
vim --clean
to skip loading your vimrc or plug-ins, this could indicate whether it's something related to your config...vim --clean
did not help, but I appreciate knowing about it. Will try over on Unix & Linux as well.winc
command (see:h winc
), which allows you to change panes.:map <C-E> :winc<Space>
to shorten the number of keystrokes. That worked fine, but now<C-W>
has started working again, so it is fully functional normal vim in both Konsole and Terminator. I restored all the old config files, and it still works fine. So, I still have no idea what the actual problem was. Perhaps there’s some vim config I don’t know about. ~/.vim/vimrc is unchanged in six months. Make your comment an answer, I'll accept.noremap <C-E> <C-W>
would have worked too.