From 3439f999b138254e4bb56187fc91f91f545b4b12 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Thu, 12 May 2016 00:01:39 +0200 Subject: [PATCH] Call s:define_commands directly (#792) This removes the fugitive_utility augroup, and allows for something like the following: > vim --cmd 'au User Fugitive Gbrowse!' path/to/file Without this patch the user's User autocommand would be run before fugitive's, and therefore the commands would not be defined already. --- plugin/fugitive.vim | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index e1e20a9..06d2e87 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -112,11 +112,6 @@ function! s:define_commands() abort endfor endfunction -augroup fugitive_utility - autocmd! - autocmd User Fugitive call s:define_commands() -augroup END - let s:abstract_prototype = {} " Section: Initialization @@ -213,6 +208,7 @@ function! fugitive#detect(path) abort endif try let [save_mls, &modelines] = [&mls, 0] + call s:define_commands() doautocmd User Fugitive finally let &mls = save_mls