Browse Source

Added function to install bundle only if vim version matches

pull/279/head
Timo Sand 13 years ago
parent
commit
cb190b65fe
2 changed files with 13 additions and 0 deletions
  1. +4
    -0
      autoload/vundle.vim
  2. +9
    -0
      autoload/vundle/config.vim

+ 4
- 0
autoload/vundle.vim View File

@ -7,6 +7,10 @@
com! -nargs=+ Bundle
\ call vundle#config#bundle(<args>)
com! -nargs=+ BundleIf
\ call vundle#config#bundle_if(<args>)
com! -nargs=? -bang -complete=custom,vundle#scripts#complete BundleInstall
\ call vundle#installer#new('!' == '<bang>', <q-args>)


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

@ -6,6 +6,15 @@ func! vundle#config#bundle(arg, ...)
return bundle
endf
func! vundle#config#bundle_if(arg, ...)
let versions = split(a:arg, '\.')
if v:version == versions[0] && has(join(['patch',versions[1]],''))
echom 'installing bundle'
echom join(a:000)
call vundle#config#bundle(join(a:000))
endif
endf
func! vundle#config#init()
if !exists('g:bundles') | let g:bundles = [] | endif
call s:rtp_rm_a()


Loading…
Cancel
Save