Skip to main content
edited body; edited title
Source Link
Vivian De Smedt
  • 21.2k
  • 5
  • 22
  • 40

How to enter insert mode when entering neovimNeovim terminal pane?

I have the following mappings to make it easy to move out of a terminal pane in neovimNeovim:

tnoremap <C-h> <C-\><C-n><C-w>h
" Workaround since <C-h> isn't working in neovimNeovim 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 neovimNeovim pane that is running terminal. What's the best way to achieve this?

How to enter insert mode when entering neovim terminal pane?

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?

How to enter insert mode when entering Neovim terminal pane?

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?

edited tags
Link
200_success
  • 9.6k
  • 5
  • 51
  • 64
Source Link
aharris88
  • 1.9k
  • 2
  • 17
  • 22

How to enter insert mode when entering neovim terminal pane?

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?