Vim fugitive with neovim terminal emulator
Asked Answered
C

1

6

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

Cripple answered 18/12, 2017 at 15:46 Comment(0)
N
3

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>.

Nichellenichol answered 27/1, 2018 at 17:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.