As title. I usually mistyped <C-w> into <C-w><C-q> and it close the window I was working on. That is really annoying... I have tried mapping this keymap into <nop> but it didn't work as expected:

  • When I typed <C-w><C-q> very fast, then indeed nothing happened, as expected.
  • But when I typed <C-w> and delayed the <C-q>, it still closed the window I was on.

Does anyone know what happened in my case? The same argument holds for <C-w>q too.

  • 1
    I can reproduce the problem. I see that If I wait after hitting <C-w> the key indicator change from ü^DW to ^W and the mapping fail to catch the code ^W^Q. Commented Feb 7, 2023 at 15:19
  • @VivianDeSmedt: Thanks for your confirmation. Commented Feb 7, 2023 at 15:49
  • Remark: On Neovim I get <80>ü^DW instead of ü^DW (gVim) Commented Feb 7, 2023 at 15:56
  • Does it has something to do with :h 'timeoutlen?
    – gildux
    Commented Feb 8, 2023 at 20:40
  • @gildux: but <C-q> itself should not close the window. In fact <C-q> is default to enter V-Block mode. Commented Feb 8, 2023 at 23:45


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.