Allow user to toggle GitGutter off and on.

This commit is contained in:
Ron Damen
2013-02-27 08:42:23 +01:00
committed by Andy Stewart
parent 29eb440cac
commit 3caf7afd60

View File

@@ -245,6 +245,14 @@ function! EnableGitGutter()
call GitGutter()
endfunction
function! ToggleGitGutter()
if s:is_gitgutter_enabled()
call DisableGitGutter()
else
call EnableGitGutter()
endif
endfunction
augroup gitgutter
autocmd!
autocmd BufReadPost,BufWritePost,FileReadPost,FileWritePost * call GitGutter()