1

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.

8
  • Welcome to Vi and Vim! You can try vim --clean to skip loading your vimrc or plug-ins, this could indicate whether it's something related to your config... – filbranden Nov 3 '20 at 22:05
  • 1
    Thank you. vim --clean did not help, but I appreciate knowing about it. Will try over on Unix & Linux as well. – kr37 Nov 4 '20 at 7:06
  • 1
    You can use the winc command (see :h winc), which allows you to change panes. – Zorzi Nov 5 '20 at 13:36
  • 1
    @Zorzi Thank you. I am/was very happy to have your work around. But then this happened (I hate this sort of solution, but it is fully solved.) In vim, I did :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. – kr37 Nov 6 '20 at 17:18
  • 1
    A mapping such as noremap <C-E> <C-W> would have worked too. – filbranden Nov 6 '20 at 20:17
1

You can use the winc command as follows:

:winc <KEY>

The <KEY> should be replaced by the key you'd be hitting after the usual <C-w>.

From the doc:

:[count]winc[md] {arg}
        Like executing CTRL-W [count] {arg}.  Example:
            :wincmd j

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.