0

I've created a new terminal by executing :tabnew +term.

How can I execute other Vim commands or move to another tab without first closing the terminal (:term)?

Currently, all input is directed to terminal.

enter image description here

1

In Neovim there's only one key combination not passed to the underlying terminal process. From :h terminal-input

To send input, enter Terminal-mode using any command that would enter "insert mode" in a normal buffer, such as i or :startinsert. In this mode all keys except <C-\><C-N> are sent to the underlying program. Use <C-\><C-N> to return to normal-mode.

As alternative use :h :tnoremap or mouse click.

Also note that in Vim there's also :h 'termwinkey' which defaults to <C-W>, so normally pressing <C-W>: moves keyboard focus into the command-line. However, 'termwinkey' is Vim-specific, while <C-\><C-N> is a universal combination to enter Normal mode in both Vim and Neovim.

2
  • Thank you. Just what I needed.
    – Shuzheng
    May 27 '20 at 11:24
  • 1
    please mention that this is nvim specific (the help topic as well). May 27 '20 at 11:27

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.