From 147b4b63afdcfa68750b7802eca361f54038f944 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 11 May 2017 14:34:48 +0200 Subject: doc (#6719) Closes #6712 --- runtime/doc/nvim_terminal_emulator.txt | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/nvim_terminal_emulator.txt b/runtime/doc/nvim_terminal_emulator.txt index 9f448ae3ba..129a2dfed3 100644 --- a/runtime/doc/nvim_terminal_emulator.txt +++ b/runtime/doc/nvim_terminal_emulator.txt @@ -43,29 +43,35 @@ restarting the {cmd} when the session is loaded. ============================================================================== Input *terminal-emulator-input* -To send input, enter terminal mode using any command that would enter "insert +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 are sent to the underlying program. Use to return -to normal mode. |CTRL-\_CTRL-N| +to normal-mode. |CTRL-\_CTRL-N| -Terminal mode has its own |:tnoremap| namespace for mappings, this can be used -to automate any terminal interaction. To map to exit terminal mode: > +Terminal-mode has its own |:tnoremap| namespace for mappings, this can be used +to automate any terminal interaction. + +To map to exit terminal-mode: > :tnoremap -< -Navigating to other windows is only possible in normal mode. For convenience, -you could use these mappings: > - :tnoremap h - :tnoremap j - :tnoremap k - :tnoremap l + +To simulate |i_CTRL-R| in terminal-mode: > + :tnoremap '"'.nr2char(getchar()).'pi' + +To use `ALT+{h,j,k,l}` to navigate windows from any mode: > + :tnoremap h + :tnoremap j + :tnoremap k + :tnoremap l + :inoremap h + :inoremap j + :inoremap k + :inoremap l :nnoremap h :nnoremap j :nnoremap k :nnoremap l -< -Then you can use `Alt+{h,j,k,l}` to navigate between windows from any mode. -Mouse input is supported, and has the following behavior: +Mouse input has the following behavior: - If the program has enabled mouse events, the corresponding events will be forwarded to the program. -- cgit