Set default values for autoload variables.

The setting of the default values for the autoload variables is moved out of
any function.  One reason being that these settings do not depend on the
argument of the function.  The second being that Vim will source the autoload
script if an undefined autoload variable is referenced and the file is
expected to define the variable (see :help autoload).
This commit is contained in:
Lucas Hoffmann 2015-03-03 11:20:43 +01:00
parent 356f245fbe
commit 16237bbb73

View File

@ -61,9 +61,9 @@ endif
" :Plugin command in the vimrc. It is not possible to do this automatically " :Plugin command in the vimrc. It is not possible to do this automatically
" because when loading the vimrc file no plugins where loaded yet. " because when loading the vimrc file no plugins where loaded yet.
func! vundle#rc(...) abort func! vundle#rc(...) abort
let g:vundle#bundle_dir = len(a:000) > 0 ? expand(a:1, 1) : expand('$HOME/.vim/bundle', 1) if a:0 > 0
let g:vundle#updated_bundles = [] let g:vundle#bundle_dir = expand(a:1, 1)
let g:vundle#log = [] endif
call vundle#config#init() call vundle#config#init()
endf endf
@ -80,4 +80,11 @@ func! vundle#end(...) abort
call vundle#config#activate_bundles() call vundle#config#activate_bundles()
endf endf
" Initialize some global variables used by Vundle.
let vundle#bundle_dir = expand('$HOME/.vim/bundle', 1)
let vundle#bundles = []
let vundle#lazy_load = 0
let vundle#log = []
let vundle#updated_bundles = []
" vim: set expandtab sts=2 ts=2 sw=2 tw=78 norl: " vim: set expandtab sts=2 ts=2 sw=2 tw=78 norl: