From 16237bbb73f1f03b494d3ade77fd0ab947776dfb Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Tue, 3 Mar 2015 11:20:43 +0100 Subject: [PATCH] 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). --- autoload/vundle.vim | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/autoload/vundle.vim b/autoload/vundle.vim index f186236..e458618 100644 --- a/autoload/vundle.vim +++ b/autoload/vundle.vim @@ -61,9 +61,9 @@ endif " :Plugin command in the vimrc. It is not possible to do this automatically " because when loading the vimrc file no plugins where loaded yet. func! vundle#rc(...) abort - let g:vundle#bundle_dir = len(a:000) > 0 ? expand(a:1, 1) : expand('$HOME/.vim/bundle', 1) - let g:vundle#updated_bundles = [] - let g:vundle#log = [] + if a:0 > 0 + let g:vundle#bundle_dir = expand(a:1, 1) + endif call vundle#config#init() endf @@ -80,4 +80,11 @@ func! vundle#end(...) abort call vundle#config#activate_bundles() 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: