motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit 4cc201cbe3a0c3faa4cde1b82ba941d410e5e81c (tree)
parent baa05dcfdaf33a098fb0fb35a3700d5b15d50751
Author: Ole Reifschneider <mail@ole-reifschneider.de>
Date:   Sat, 28 Mar 2015 16:11:07 +0100

Use the neovim terminal emulator for :Git

Diffstat:
Mplugin/fugitive.vim | 14++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim @@ -670,8 +670,17 @@ function! s:Git(bang, args) abort let git .= ' --no-pager' endif let args = matchstr(a:args,'\v\C.{-}%($|\\@<!%(\\\\)*\|)@=') - call s:ExecuteInTree('!'.git.' '.args) - call fugitive#reload_status() + if exists(':terminal') + let dir = s:repo().tree() + tabnew + execute 'lcd' fnameescape(dir) + execute 'terminal' git args + else + call s:ExecuteInTree('!'.git.' '.args) + if has('win32') + call fugitive#reload_status() + endif + endif return matchstr(a:args, '\v\C\\@<!%(\\\\)*\|\zs.*') endfunction @@ -708,6 +717,7 @@ augroup fugitive_status autocmd! if !has('win32') autocmd FocusGained,ShellCmdPost * call fugitive#reload_status() + autocmd BufDelete term://* call fugitive#reload_status() endif augroup END