3

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?

4
  • 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, 2019 at 2:04
  • 2
    Make sure to use a capital N, not a lowercase n Jan 28, 2019 at 12:56
  • Thanks, that actually was the issue... the capital.. I can't believe I made such a simple mistake.
    – Mike
    Jan 28, 2019 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 Apr 11, 2019 at 9:49

1 Answer 1

2

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>
1
  • Just want to chime in that I too made the blunder of not realizing they meant capital N. Also typing C-\ is impossible on a nordic keyboard layout as `` is not accessible without holding other modifier keys (Swedish Mac layout requires Alt-Shift-7).
    – Spoike
    May 21, 2020 at 17:40

Your Answer

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

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