44" Readme: http://github.com/gmarik/Vundle.vim/blob/master/README.md
55" Version: 0.10.2
66
7+ " Save the path from which Vundle was first loaded
8+ let g: vundle_path = expand (' <sfile>:p:h:h' )
9+
710" Plugin Commands
811com ! -nargs =+ - bar Plugin
912\ call vundle#config#bundle (<args> )
6164" :Plugin command in the vimrc. It is not possible to do this automatically
6265" because when loading the vimrc file no plugins where loaded yet.
6366func ! vundle#rc (... ) abort
67+ " If this function has already been called and Vim hasn't finished loading,
68+ " that is, we are not sourcing our .vimrc file later on, Vundle is probably
69+ " loading from several sources which can lead to unpredictable results.
70+ if exists (' g:vundle_loading' ) && g: vundle_loading
71+ echoerr ' Vundle is probably loading from several sources. ' .
72+ \ ' This can lead to unpredictable results! ' .
73+ \ ' Please find and remove the duplication.'
74+ endif
75+
76+ " Set g:vundle_loading only if Vim hasn't finished loading.
77+ if ! exists (' g:vundle_loaded' ) || ! g: vundle_loaded
78+ let g: vundle_loading = 1
79+ endif
80+
6481 let g: bundle_dir = len (a: 000 ) > 0 ? expand (a: 1 , 1 ) : expand (' $HOME/.vim/bundle' , 1 )
6582 let g: updated_bundles = []
6683 let g: vundle_log = []
@@ -81,4 +98,12 @@ func! vundle#end(...) abort
8198 call vundle#config#activate_bundles ()
8299endf
83100
101+ augroup vundle
102+ au !
103+
104+ " Tell Vundle it has finished loading and Vim is up and running.
105+ au VimEnter * unlet g: vundle_loading
106+ au VimEnter * let g: vundle_loaded = 1
107+ augroup END
108+
84109" vim: set expandtab sts = 2 ts = 2 sw = 2 tw = 78 norl :
0 commit comments