I like the terminal in neovim. I am accustomed to tmux and tmux's copy-mode, and type q to exit copy-mode to return back to regular-interactive-mode. Now, in neovim, when in NORMAL mode (which is akin to copy-mode in tmux), I end up typing q hoping to get back to INSERT mode, only to realize nothing happening (as neovim dutifully prepares to start recording). I also use macro recording in vim.
So, is there a way to normal-mode-map q to a only when its a terminal-buffer? And retain q for its existing record-macro use in other buffers?
tnoremapdoes not work? – Sunny Pun Nov 30 '17 at 17:14:h terminal-input,tmap's only affect terminal-mode which is when keys are pass to the underlying terminal. Think of terminal mode as a variant insert-mode for terminal buffers. – Peter Rincker Nov 30 '17 at 17:19:h terminal-emulator-input, for whoever interested to read that part of the manual) – Sunny Pun Nov 30 '17 at 17:31:h :termwhich lead me to:h terminalwhere I read theterminal_emulator.txthelp page. Which has the information you are looking for and the tag. However if I had neovim I would probably do:h term<c-d>to list out terminal topics or searched via:helpgrep terminal. How to use:help– Peter Rincker Dec 01 '17 at 15:45