Skip to content

Commit

Permalink
Set default values for autoload variables.
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
lucc committed Mar 4, 2015
1 parent 356f245 commit 16237bb
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions autoload/vundle.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:

0 comments on commit 16237bb

Please sign in to comment.