From 00bd2c49cedb68a0350ba2484540bb702312902b Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Fri, 5 Feb 2016 12:17:28 +0100 Subject: [PATCH] Neovim: add new stuff to :terminal --- content/neovim.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/content/neovim.md b/content/neovim.md index c2aa6f3..8c4939d 100644 --- a/content/neovim.md +++ b/content/neovim.md @@ -16,6 +16,31 @@ programs](../README.md#running-external-programs-and-using-filters) like this: pipes ([libuv processes](https://nikhilm.github.io/uvbook/processes.html)) for communication now. Use `:te read foo && echo $foo` instead. +By now you might have noticed, that you can't leave the insert mode in a +terminal buffer via ``, since it gets captured by the terminal emulator +instead of Neovim. Use `` instead. + +Since terminal buffers are a new kind of buffer (`&buftype` is set to +"terminal"), there are also new commands for creating terminal +[mappings](../README.md#mappings): `:tmap`, `:tnoremap`, and `:tunmap`. + +There are also two new [autocmd](../README.md#autocmds) events: `TermOpen` and +`TermClose`. + +Here an example configuration: + +```vim +if has('nvim') + nnoremap t :vsplit +terminal + tnoremap + tnoremap h + tnoremap j + tnoremap k + tnoremap l + autocmd BufEnter term://* startinsert +endif +``` + Related help: :h :terminal