From d434627738c59473530d807cb645df6deb4c8e80 Mon Sep 17 00:00:00 2001 From: jdhao Date: Sat, 7 Aug 2021 02:32:12 +0800 Subject: Fix: the loading condition for fugitive is wrong We should load fugitive in the following two situations: + When we open nvim in a Git repository + When we are inside nvim and change the working directory to a Git reposity --- core/autocommands.vim | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/autocommands.vim') diff --git a/core/autocommands.vim b/core/autocommands.vim index 1cc207a..2563ce7 100644 --- a/core/autocommands.vim +++ b/core/autocommands.vim @@ -89,4 +89,9 @@ function! s:quit_current_win() abort quit endif endfunction + +augroup git_repo_check + autocmd! + autocmd VimEnter,DirChanged * call utils#Inside_git_repo() +augroup END "} -- cgit v1.2.3