I've looked at quite a few other posts and haven't found a similar problem. I've recently begun using WSL and Vim and love it. Most of the time, it works great and I use CTRL-W-h/j/k/l to navigate between panes just fine. I'm not sure if this is a problem with Vim or WSL. I have tried multiple terminal emulators (which I will list below) and this has happened with all of them.

Anyway, a handful of times a day, it bugs out when I open a terminal in a new pane (using either :term or :vert term). During these times, I cannot use CTRL-W or CTRL-W-h/j/k/l to navigate between panes at all; I'm just stuck in that pane, and the only way I can get out of it is by typing 'exit' and then save-closing (:w :q) out of the pane I end up in next, until I get to the pane I want. Even after I've closed that terminal pane, I can't switch around the other panes anymore, so I have to close all open panes.

At that point, I just open a new terminal tab (using whatever terminal emulator I'm using) and start over/set up all my splits again.

I was first using Windows Terminal (syntax colors hurt my eyes and I can't change them because I'm using a loaner workstation from university), switched to Hyper terminal, then switched to Terminus thinking it might be a Hyper problem. I used Terminus for a few hours but my cursor and typing lagged so hard I switched to Fluent. Even using Terminus for only a few hours, the bug happened again. The bug has happened with Fluent terminal as well.

I thought I would post here to see if maybe there is an explanation for this (maybe there are times when I'm supposed to use something other than CTRL-W-h/j/k/l? Maybe there is some kind of contextual switch that happened that I'm not aware of?) or if it's a known bug using Vim on WSL.

Thanks in advance for your help!

  • Fluent terminal (and Hyper, Terminus, and Windows Terminal)
  • Windows subsystem for Linux
  • Vim 8.1.2269
  • Ubuntu 20.04.2
  • 2
    If this is of any help, I was able to reproduce using Ubuntu 20.04.1 as a WSL2 instance working in latest version of Windows Terminal, same vim version as yours. As in your case, once that happened, the terminal session was compromised and starting vim anew didn't help. I was able to reproduce that only once.
    – parml
    Feb 7, 2021 at 11:24
  • 3
    Welcome to Vi and Vim!
    – D. Ben Knoble
    Feb 7, 2021 at 15:04
  • Well it sounds like it might be a problem with WSL and I'll just have to wait until my very back-ordered laptop arrives so I can install Ubuntu on it. Thank you @parml for taking the time! Feb 8, 2021 at 14:27


Your Answer

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

Browse other questions tagged or ask your own question.