Browse Source

Merge 108935167d into d690c777f1

pull/422/merge
leiming 12 years ago
parent
commit
811ff4f8a9
3 changed files with 16 additions and 11 deletions
  1. +3
    -1
      README.md
  2. +12
    -10
      autoload/vundle/config.vim
  3. +1
    -0
      test/vimrc

+ 3
- 1
README.md View File

@ -60,8 +60,10 @@
Plugin 'Lokaltog/vim-easymotion'
Plugin 'tpope/vim-rails.git'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
" Pass the path to set the runtimepath inside the repo properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Pass the path to set the plugin's runtimepath dir.
Plugin 'joonty/vim-sauce', {'bundle_dir' : '~/plugin_dir/'}
" scripts from http://vim-scripts.org/vim/scripts.html
Plugin 'L9'
Plugin 'FuzzyFinder'


+ 12
- 10
autoload/vundle/config.vim View File

@ -16,9 +16,9 @@ func! vundle#config#require(bundles) abort
for b in a:bundles
call s:rtp_add(b.rtpath)
call s:rtp_add(g:bundle_dir)
" TODO: it has to be relative rtpath, not bundle.name
exec 'runtime! '.b.name.'/plugin/*.vim'
exec 'runtime! '.b.name.'/after/*.vim'
" Use absolute rtpath
exec 'runtime! '.b.rtpath.'/plugin/*.vim'
exec 'runtime! '.b.rtpath.'/after/*.vim'
call s:rtp_rm(g:bundle_dir)
endfor
endf
@ -34,13 +34,14 @@ func! vundle#config#init_bundle(name, opts)
endf
func! s:parse_options(opts)
" TODO: improve this
if len(a:opts) != 1 | return {} | endif
if type(a:opts) == type({})
return a:opts
endif
if type(a:opts[0]) == type({})
return a:opts[0]
else
return {'rev': a:opts[0]}
if type(a:opts) == type([]) && len(a:opts) == 1
return type(a:opts[0]) == type({}) ? a:opts[0] : {'rev':a:opts[0]}
else
return {}
endif
endf
@ -104,6 +105,7 @@ endf
let s:bundle = {}
func! s:bundle.path()
return s:expand_path(g:bundle_dir.'/'.self.name)
let a:bundle_dir = has_key(self, "bundle_dir") ? self.bundle_dir : g:bundle_dir
return s:expand_path(a:bundle_dir.'/'.self.name)
endf

+ 1
- 0
test/vimrc View File

@ -51,6 +51,7 @@ Bundle '~/Dropbox/.gitrepos/utilz.vim.git'
" with options
Bundle 'rstacruz/sparkup.git', {'rtp': 'vim/'}
Bundle 'matchit.zip', {'name': 'matchit'}
Plugin 'joonty/vim-sauce', {'bundle_dir' : '~/.vim/custom_bundle/'}
" Camel case
Bundle 'vim-scripts/RubySinatra'


Loading…
Cancel
Save