Fix load order issue setting up maps

References https://github.com/tpope/vim-fugitive/issues/1044
This commit is contained in:
Tim Pope
2018-06-20 14:24:35 -04:00
parent 13f39967f4
commit 639b9f9a54
2 changed files with 13 additions and 12 deletions

View File

@@ -156,6 +156,15 @@ augroup fugitive
autocmd VimEnter * if expand('<amatch>')==''|call FugitiveDetect(getcwd())|endif
autocmd CmdWinEnter * call FugitiveDetect(expand('#:p'))
autocmd FileType git
\ if exists('b:git_dir') |
\ call fugitive#MapJumps() |
\ endif
autocmd FileType git,gitcommit,gitrebase
\ if exists('b:git_dir') |
\ call fugitive#MapCfile() |
\ endif
autocmd BufReadCmd index{,.lock}
\ if FugitiveIsGitDir(expand('<amatch>:p:h')) |
\ exe fugitive#BufReadStatus() |