Browse Source

replace runtime! calls with source

- See:
- src/main.c - for plugin loading
- src/ex_cmds2.c - for how :runtime! and :source work

- benefit of using source vs runtime is that it's faster as doesn't
traverse &rtp
events
gmarik 15 years ago
parent
commit
52456534f9
1 changed files with 9 additions and 5 deletions
  1. +9
    -5
      autoload/vundle/config.vim

+ 9
- 5
autoload/vundle/config.vim View File

@ -13,15 +13,19 @@ endf
func! vundle#config#require(bundles) abort
for b in a:bundles
" TODO: should this be here?
call s:rtp_add(b.rtpath())
call s:rtp_add(g:vundle#bundle_dir)
" TODO: it has to be relative rtpath, not bundle.name
exec 'runtime! '.b.name.'/plugin/*.vim'
exec 'runtime! '.b.name.'/after/*.vim'
call s:rtp_rm(g:vundle#bundle_dir)
" load plugin
for s in s:glob(b.rtpath().'/plugin/**/*.vim')
exec 'source '.s
endfor
endfor
endf
func! s:glob(pattern)
return split(glob(a:pattern),"\n")
endf
func! vundle#config#init_bundle(bang, name, opts)
let opts = extend(s:parse_options(a:bang, a:opts), s:parse_name(substitute(a:name,"['".'"]\+','','g')),'keep')
return extend(opts, copy(s:bundle))


Loading…
Cancel
Save