File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 6161" :Plugin command in the vimrc. It is not possible to do this automatically
6262" because when loading the vimrc file no plugins where loaded yet.
6363func ! vundle#rc (... ) abort
64+ " If this function has already been called and Vim hasn't finished loading,
65+ " that is, we are not sourcing our .vimrc file later on, Vundle is probably
66+ " loading from several sources which can lead to unpredictable results.
67+ if exists (' g:vundle_loading' ) && g: vundle_loading
68+ echoerr ' Vundle is probably loading from several sources. ' .
69+ \ ' This can lead to unpredictable results! ' .
70+ \ ' Please find and remove the duplication.'
71+ endif
72+
73+ " Set g:vundle_loading only if Vim hasn't finished loading.
74+ if ! exists (' g:vundle_loaded' ) || ! g: vundle_loaded
75+ let g: vundle_loading = 1
76+ endif
77+
6478 let g: bundle_dir = len (a: 000 ) > 0 ? expand (a: 1 , 1 ) : expand (' $HOME/.vim/bundle' , 1 )
6579 let g: updated_bundles = []
6680 let g: vundle_log = []
@@ -81,4 +95,12 @@ func! vundle#end(...) abort
8195 call vundle#config#activate_bundles ()
8296endf
8397
98+ augroup vundle
99+ au !
100+
101+ " Tell Vundle it has finished loading and Vim is up and running.
102+ au VimEnter * unlet g: vundle_loading
103+ au VimEnter * let g: vundle_loaded = 1
104+ augroup END
105+
84106" vim: set expandtab sts = 2 ts = 2 sw = 2 tw = 78 norl :
You can’t perform that action at this time.
0 commit comments