I am trying to work more with the built-in terminal for vim 8.1 and reading through the docs noticed it has two keybindings for entering the normal Terminal-mode. CTRL+\ CTRL+N as well as CTRL+W CTRL+N.

While The CTRL+\ CTRL+N works the other does not, it seems that CTRL+W CTRL+N is associated with the :new command as well. Is this expected behavior or is there possibly a setting that I have on that might effect this that I can't find?

  • 3
    According to help the two equivalent commands are Ctrl-W N and Ctrl-\ Ctrl-N, i.e. the first one uses unadorned N. It's separate from the "create a new window" command. – B Layer Jan 26 at 2:04
  • 2
    Make sure to use a capital N, not a lowercase n – Christian Brabandt Jan 28 at 12:56
  • Thanks, that actually was the issue... the capital.. I can't believe I made such a simple mistake. – Mike Jan 28 at 19:00
  • Thanks, Ctrl-\ Ctrl-n switched me back to NORMAL mode, so I was able to move across windows with Ctrl-w again. A bit tricky, a question of habit – Geradlus_RU Apr 11 at 9:49

So, after the obvious blunder of not using a capital N 🤦‍♂️ ... I was able to get the remap working with the lowercase n (just for terminal) which is what I was hoping to get. This was done by adding the following to my vim startup.

tnoremap <C-W>n <C-\><C-n>

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.