Creating Mappings for Terminal in Neovim

© 2012 - 2017 thoughtbot, inc. Upcase, the design of a robot, and thoughtbot are registered trademarks of thoughtbot, inc.


This is a companion discussion topic for the original entry at https://thoughtbot.com/upcase/videos/neovim-creating-mappings-for-terminal

On macOS in iterm2, it seems like my normal mappings for easy pane navigation… (

nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
nnoremap <C-h> <C-w>h

)

…don’t work. Is that expected in neovim or is that something wrong with my setup somewhere?

I think terminal mode in NeoVim requires custom tnoremap mappings. I’m not using neovim myself, but you can take a look at Add Nvim terminal emulator key mappings by fszymanski · Pull Request #172 · christoomey/vim-tmux-navigator · GitHub as a related example. Hope that helps!