I have the following mappings to make it easy to move out of a terminal pane in Neovim:
tnoremap <C-h> <C-\><C-n><C-w>h
" Workaround since <C-h> isn't working in Neovim right now
tnoremap <C-w>h <C-\><C-n><C-w>h
tnoremap <C-j> <C-\><C-n><C-w>j
tnoremap <C-k> <C-\><C-n><C-w>k
tnoremap <C-l> <C-\><C-n><C-w>l
The only problem is that when I move back into the terminal pane, I have to press i
to get back into insert mode. I always want it to be in insert mode when I move into a Neovim pane that is running terminal. What's the best way to achieve this?