Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim fugitive with neovim terminal emulator

I recently switched from vim to neovim, installing the vim-fugitive plugin. Before, running :Git rebase -i in vim bought up the interactive rebase window in a vim window which I could edit as I needed to, :x out of the window and the rebase would be performed.

Now, in neovim, running the same rebase command brings up a terminal emulator buffer with the interactive rebase within. The emulator is non modifiable until I enter terminal mode pressing I. I can then edit the commits as I need to but how do I then close the emulator to carry out the rebase? Is there a way to prevent the terminal emulator coming up after running :Git commands? I've had a look through the vim-fugitive documentation but can't find anything about this. Any help would be greatly appreciated, thanks

like image 470
dbatten Avatar asked Dec 18 '17 15:12

dbatten


1 Answers

Insert the following into your init.vim:

tnoremap <Esc> <C-\><C-n>
tnoremap <C-v><Esc> <Esc>

Now you can leave the terminal-mode with <Esc>.

like image 196
chrboesch Avatar answered Oct 17 '22 11:10

chrboesch