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.
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.
Sign up to join this communityI'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.
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.