Browse Source

Rename everything /[Bb]undle/ to /[Vv]undle/

pull/86/head
Oleg Kostyuk 15 years ago
parent
commit
b91d6ab0a9
8 changed files with 176 additions and 176 deletions
  1. +22
    -22
      README.md
  2. +10
    -10
      autoload/vundle.vim
  3. +18
    -18
      autoload/vundle/config.vim
  4. +30
    -30
      autoload/vundle/installer.vim
  5. +16
    -16
      autoload/vundle/scripts.vim
  6. +58
    -58
      doc/vundle.txt
  7. +2
    -2
      test/minirc.vim
  8. +20
    -20
      test/vimrc

+ 22
- 22
README.md View File

@ -9,10 +9,10 @@
1. Setup [Vundle]: 1. Setup [Vundle]:
``` ```
$ git clone http://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
$ git clone http://github.com/gmarik/vundle.git ~/.vim/vundle/vundle
``` ```
2. Configure bundles:
2. Configure vundles:
Sample `.vimrc`: Sample `.vimrc`:
@ -20,47 +20,47 @@
set nocompatible " be iMproved set nocompatible " be iMproved
filetype off " required! filetype off " required!
set rtp+=~/.vim/bundle/vundle/
set rtp+=~/.vim/vundle/vundle/
call vundle#rc() call vundle#rc()
" let Vundle manage Vundle " let Vundle manage Vundle
" required! " required!
Bundle 'gmarik/vundle'
Vundle 'gmarik/vundle'
" My Bundles here:
" My Vundles here:
" "
" original repos on github " original repos on github
Bundle 'tpope/vim-fugitive'
Bundle 'Lokaltog/vim-easymotion'
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
Vundle 'tpope/vim-fugitive'
Vundle 'Lokaltog/vim-easymotion'
Vundle 'rstacruz/sparkup', {'rtp': 'vim/'}
" vim-scripts repos " vim-scripts repos
Bundle 'L9'
Bundle 'FuzzyFinder'
Bundle 'rails.vim'
Vundle 'L9'
Vundle 'FuzzyFinder'
Vundle 'rails.vim'
" non github repos " non github repos
Bundle 'git://git.wincent.com/command-t.git'
Vundle 'git://git.wincent.com/command-t.git'
" ... " ...
filetype plugin indent on " required! filetype plugin indent on " required!
" "
" Brief help " Brief help
" :BundleList - list configured bundles
" :BundleInstall(!) - install(update) bundles
" :BundleSearch(!) foo - search(or refresh cache first) for foo
" :BundleClean(!) - confirm(or auto-approve) removal of unused bundles
" :VundleList - list configured vundles
" :VundleInstall(!) - install(update) vundles
" :VundleSearch(!) foo - search(or refresh cache first) for foo
" :VundleClean(!) - confirm(or auto-approve) removal of unused vundles
" "
" see :h vundle for more details or wiki for FAQ " see :h vundle for more details or wiki for FAQ
" NOTE: comments after Bundle command are not allowed..
" NOTE: comments after Vundle command are not allowed..
``` ```
3. Install configured bundles:
3. Install configured vundles:
Launch `vim`, run `:BundleInstall`.
Launch `vim`, run `:VundleInstall`.
*Windows users* see [Vundle for Windows](https://github.com/gmarik/vundle/wiki/Vundle-for-Windows) *Windows users* see [Vundle for Windows](https://github.com/gmarik/vundle/wiki/Vundle-for-Windows)
Installing requires [Git] and triggers [Git clone](http://gitref.org/creating/#clone) for each configured repo to `~/.vim/bundle/`.
Installing requires [Git] and triggers [Git clone](http://gitref.org/creating/#clone) for each configured repo to `~/.vim/vundle/`.
## Why Vundle ## Why Vundle
@ -117,10 +117,10 @@ see [wiki](/gmarik/vundle/wiki)
## TODO: ## TODO:
[Vundle] is a work in progress so any ideas/patches appreciated [Vundle] is a work in progress so any ideas/patches appreciated
* √ activate newly added bundles on .vimrc reload or after :BundleInstall
* √ activate newly added vundles on .vimrc reload or after :VundleInstall
* √ use preview window for search results * √ use preview window for search results
* √ vim documentation * √ vim documentation
* √ put vundle to bundles/ too(will fix vundle help)
* √ put vundle to vundles/ too(will fix vundle help)
* √ tests * √ tests
* √ improve error handling * √ improve error handling
* allow specify revision/version? * allow specify revision/version?


+ 10
- 10
autoload/vundle.vim View File

@ -4,26 +4,26 @@
" Readme: http://github.com/gmarik/vundle/blob/master/README.md " Readme: http://github.com/gmarik/vundle/blob/master/README.md
" Version: 0.8 " Version: 0.8
com! -nargs=+ Bundle
\ call vundle#config#bundle(<args>)
com! -nargs=+ Vundle
\ call vundle#config#vundle(<args>)
com! -nargs=? -bang -complete=custom,vundle#scripts#complete BundleInstall
com! -nargs=? -bang -complete=custom,vundle#scripts#complete VundleInstall
\ call vundle#installer#new('!' == '<bang>', <q-args>) \ call vundle#installer#new('!' == '<bang>', <q-args>)
com! -nargs=? -bang -complete=custom,vundle#scripts#complete BundleSearch
com! -nargs=? -bang -complete=custom,vundle#scripts#complete VundleSearch
\ call vundle#scripts#all('!'=='<bang>', <q-args>) \ call vundle#scripts#all('!'=='<bang>', <q-args>)
com! -nargs=? -bang -complete=custom,vundle#scripts#complete Bundles
com! -nargs=? -bang -complete=custom,vundle#scripts#complete Vundles
\ call vundle#scripts#all('!'=='<bang>', <q-args>) \ call vundle#scripts#all('!'=='<bang>', <q-args>)
com! -nargs=0 -bang BundleList
com! -nargs=0 -bang VundleList
\ call vundle#installer#list('!'=='<bang>') \ call vundle#installer#list('!'=='<bang>')
com! -nargs=? -bang BundleClean
com! -nargs=? -bang VundleClean
\ call vundle#installer#clean('!' == '<bang>') \ call vundle#installer#clean('!' == '<bang>')
com! -nargs=0 BundleDocs
\ call vundle#installer#helptags(g:bundles)
com! -nargs=0 VundleDocs
\ call vundle#installer#helptags(g:vundles)
if (has('signs')) if (has('signs'))
@ -36,7 +36,7 @@ endif
func! vundle#rc(...) abort func! vundle#rc(...) abort
let g:bundle_dir = len(a:000) > 0 ? expand(a:1) : expand('$HOME/.vim/bundle')
let g:vundle_dir = len(a:000) > 0 ? expand(a:1) : expand('$HOME/.vim/vundle')
let g:vundle_log = [] let g:vundle_log = []
call vundle#config#init() call vundle#config#init()
endf endf

+ 18
- 18
autoload/vundle/config.vim View File

@ -1,30 +1,30 @@
func! vundle#config#bundle(arg, ...)
let bundle = vundle#config#init_bundle(a:arg, a:000)
func! vundle#config#vundle(arg, ...)
let vundle = vundle#config#init_vundle(a:arg, a:000)
call s:rtp_rm_a() call s:rtp_rm_a()
call add(g:bundles, bundle)
call add(g:vundles, vundle)
call s:rtp_add_a() call s:rtp_add_a()
endf endf
func! vundle#config#init() func! vundle#config#init()
if !exists('g:bundles') | let g:bundles = [] | endif
if !exists('g:vundles') | let g:vundles = [] | endif
call s:rtp_rm_a() call s:rtp_rm_a()
let g:bundles = []
let g:vundles = []
endf endf
func! vundle#config#require(bundles) abort
for b in a:bundles
func! vundle#config#require(vundles) abort
for b in a:vundles
call s:rtp_add(b.rtpath()) call s:rtp_add(b.rtpath())
call s:rtp_add(g:bundle_dir)
" TODO: it has to be relative rtpath, not bundle.name
call s:rtp_add(g:vundle_dir)
" TODO: it has to be relative rtpath, not vundle.name
exec 'runtime! '.b.name.'/plugin/*.vim' exec 'runtime! '.b.name.'/plugin/*.vim'
exec 'runtime! '.b.name.'/after/*.vim' exec 'runtime! '.b.name.'/after/*.vim'
call s:rtp_rm(g:bundle_dir)
call s:rtp_rm(g:vundle_dir)
endfor endfor
endf endf
func! vundle#config#init_bundle(name, opts)
func! vundle#config#init_vundle(name, opts)
let opts = extend(s:parse_options(a:opts), s:parse_name(substitute(a:name,"['".'"]\+','','g'))) let opts = extend(s:parse_options(a:opts), s:parse_name(substitute(a:name,"['".'"]\+','','g')))
return extend(opts, copy(s:bundle))
return extend(opts, copy(s:vundle))
endf endf
func! s:parse_options(opts) func! s:parse_options(opts)
@ -61,11 +61,11 @@ func! s:parse_name(arg)
endf endf
func! s:rtp_rm_a() func! s:rtp_rm_a()
call filter(copy(g:bundles), 's:rtp_rm(v:val.rtpath())')
call filter(copy(g:vundles), 's:rtp_rm(v:val.rtpath())')
endf endf
func! s:rtp_add_a() func! s:rtp_add_a()
call filter(reverse(copy(g:bundles)), 's:rtp_add(v:val.rtpath())')
call filter(reverse(copy(g:vundles)), 's:rtp_add(v:val.rtpath())')
endf endf
func! s:rtp_rm(dir) abort func! s:rtp_rm(dir) abort
@ -82,12 +82,12 @@ func! s:expand_path(path) abort
return simplify(expand(a:path)) return simplify(expand(a:path))
endf endf
let s:bundle = {}
let s:vundle = {}
func! s:bundle.path()
return s:expand_path(g:bundle_dir.'/'.self.name)
func! s:vundle.path()
return s:expand_path(g:vundle_dir.'/'.self.name)
endf endf
func! s:bundle.rtpath()
func! s:vundle.rtpath()
return has_key(self, 'rtp') ? s:expand_path(self.path().'/'.self.rtp) : self.path() return has_key(self, 'rtp') ? s:expand_path(self.path().'/'.self.rtp) : self.path()
endf endf

+ 30
- 30
autoload/vundle/installer.vim View File

@ -1,14 +1,14 @@
func! vundle#installer#new(bang, ...) abort func! vundle#installer#new(bang, ...) abort
let bundles = (a:1 == '') ?
\ g:bundles :
\ map(copy(a:000), 'vundle#config#init_bundle(v:val, {})')
let vundles = (a:1 == '') ?
\ g:vundles :
\ map(copy(a:000), 'vundle#config#init_vundle(v:val, {})')
let names = vundle#scripts#bundle_names(map(copy(bundles), 'v:val.name_spec'))
call vundle#scripts#view('Installer',['" Installing bundles to '.expand(g:bundle_dir)], names + ['Helptags'])
let names = vundle#scripts#vundle_names(map(copy(vundles), 'v:val.name_spec'))
call vundle#scripts#view('Installer',['" Installing vundles to '.expand(g:vundle_dir)], names + ['Helptags'])
call s:process(a:bang, (a:bang ? 'add!' : 'add')) call s:process(a:bang, (a:bang ? 'add!' : 'add'))
call vundle#config#require(bundles)
call vundle#config#require(vundles)
endf endf
@ -83,57 +83,57 @@ endf
func! vundle#installer#install_and_require(bang, name) abort func! vundle#installer#install_and_require(bang, name) abort
let result = vundle#installer#install(a:bang, a:name) let result = vundle#installer#install(a:bang, a:name)
let b = vundle#config#init_bundle(a:name, {})
let b = vundle#config#init_vundle(a:name, {})
call vundle#config#require([b]) call vundle#config#require([b])
return result return result
endf endf
func! vundle#installer#install(bang, name) abort func! vundle#installer#install(bang, name) abort
if !isdirectory(g:bundle_dir) | call mkdir(g:bundle_dir, 'p') | endif
if !isdirectory(g:vundle_dir) | call mkdir(g:vundle_dir, 'p') | endif
let b = vundle#config#init_bundle(a:name, {})
let b = vundle#config#init_vundle(a:name, {})
return s:sync(a:bang, b) return s:sync(a:bang, b)
endf endf
func! vundle#installer#docs() abort func! vundle#installer#docs() abort
call vundle#installer#helptags(g:bundles)
call vundle#installer#helptags(g:vundles)
return 'updated' return 'updated'
endf endf
func! vundle#installer#helptags(bundles) abort
let bundle_dirs = map(copy(a:bundles),'v:val.rtpath()')
let help_dirs = filter(bundle_dirs, 's:has_doc(v:val)')
func! vundle#installer#helptags(vundles) abort
let vundle_dirs = map(copy(a:vundles),'v:val.rtpath()')
let help_dirs = filter(vundle_dirs, 's:has_doc(v:val)')
call s:log('') call s:log('')
call s:log('Helptags:') call s:log('Helptags:')
call map(copy(help_dirs), 's:helptags(v:val)') call map(copy(help_dirs), 's:helptags(v:val)')
call s:log('Helptags: '.len(help_dirs).' bundles processed')
call s:log('Helptags: '.len(help_dirs).' vundles processed')
return help_dirs return help_dirs
endf endf
func! vundle#installer#list(bang) abort func! vundle#installer#list(bang) abort
let bundles = vundle#scripts#bundle_names(map(copy(g:bundles), 'v:val.name_spec'))
call vundle#scripts#view('list', ['" My Bundles'], bundles)
let vundles = vundle#scripts#vundle_names(map(copy(g:vundles), 'v:val.name_spec'))
call vundle#scripts#view('list', ['" My Vundles'], vundles)
redraw! redraw!
echo len(g:bundles).' bundles configured'
echo len(g:vundles).' vundles configured'
endf endf
func! vundle#installer#clean(bang) abort func! vundle#installer#clean(bang) abort
let bundle_dirs = map(copy(g:bundles), 'v:val.path()')
let all_dirs = split(globpath(g:bundle_dir, '*'), "\n")
let x_dirs = filter(all_dirs, '0 > index(bundle_dirs, v:val)')
let vundle_dirs = map(copy(g:vundles), 'v:val.path()')
let all_dirs = split(globpath(g:vundle_dir, '*'), "\n")
let x_dirs = filter(all_dirs, '0 > index(vundle_dirs, v:val)')
if empty(x_dirs) if empty(x_dirs)
let headers = ['" All clean!'] let headers = ['" All clean!']
let names = [] let names = []
else else
let headers = ['" Removing bundles:']
let names = vundle#scripts#bundle_names(map(copy(x_dirs), 'fnamemodify(v:val, ":t")'))
let headers = ['" Removing vundles:']
let names = vundle#scripts#vundle_names(map(copy(x_dirs), 'fnamemodify(v:val, ":t")'))
end end
call vundle#scripts#view('clean', headers, names) call vundle#scripts#view('clean', headers, names)
@ -151,13 +151,13 @@ func! vundle#installer#delete(bang, dir_name) abort
\ 'rmdir /S /Q' : \ 'rmdir /S /Q' :
\ 'rm -rf' \ 'rm -rf'
let bundle = vundle#config#init_bundle(a:dir_name, {})
let cmd .= ' '.shellescape(bundle.path())
let vundle = vundle#config#init_vundle(a:dir_name, {})
let cmd .= ' '.shellescape(vundle.path())
let out = s:system(cmd) let out = s:system(cmd)
call s:log('') call s:log('')
call s:log('Bundle '.a:dir_name)
call s:log('Vundle '.a:dir_name)
call s:log('$ '.cmd) call s:log('$ '.cmd)
call s:log('> '.out) call s:log('> '.out)
@ -184,23 +184,23 @@ func! s:helptags(rtp) abort
endtry endtry
endf endf
func! s:sync(bang, bundle) abort
let git_dir = expand(a:bundle.path().'/.git/')
func! s:sync(bang, vundle) abort
let git_dir = expand(a:vundle.path().'/.git/')
if isdirectory(git_dir) if isdirectory(git_dir)
if !(a:bang) | return 'todate' | endif if !(a:bang) | return 'todate' | endif
let cmd = 'cd '.shellescape(a:bundle.path()).' && git pull'
let cmd = 'cd '.shellescape(a:vundle.path()).' && git pull'
if (has('win32') || has('win64')) if (has('win32') || has('win64'))
let cmd = substitute(cmd, '^cd ','cd /d ','') " add /d switch to change drives let cmd = substitute(cmd, '^cd ','cd /d ','') " add /d switch to change drives
let cmd = '"'.cmd.'"' " enclose in quotes let cmd = '"'.cmd.'"' " enclose in quotes
endif endif
else else
let cmd = 'git clone '.a:bundle.uri.' '.shellescape(a:bundle.path())
let cmd = 'git clone '.a:vundle.uri.' '.shellescape(a:vundle.path())
endif endif
let out = s:system(cmd) let out = s:system(cmd)
call s:log('') call s:log('')
call s:log('Bundle '.a:bundle.name_spec)
call s:log('Vundle '.a:vundle.name_spec)
call s:log('$ '.cmd) call s:log('$ '.cmd)
call s:log('> '.out) call s:log('> '.out)


+ 16
- 16
autoload/vundle/scripts.vim View File

@ -1,6 +1,6 @@
func! vundle#scripts#all(bang, ...) func! vundle#scripts#all(bang, ...)
let b:match = '' let b:match = ''
let info = ['"Keymap: i - Install bundle; c - Cleanup; s - Search; R - Reload list']
let info = ['"Keymap: i - Install vundle; c - Cleanup; s - Search; R - Reload list']
let matches = s:load_scripts(a:bang) let matches = s:load_scripts(a:bang)
if !empty(a:1) if !empty(a:1)
let matches = filter(matches, 'v:val =~? "'.escape(a:1,'"').'"') let matches = filter(matches, 'v:val =~? "'.escape(a:1,'"').'"')
@ -8,13 +8,13 @@ func! vundle#scripts#all(bang, ...)
" TODO: highlight matches " TODO: highlight matches
let b:match = a:1 let b:match = a:1
endif endif
call vundle#scripts#view('search',info, vundle#scripts#bundle_names(reverse(matches)))
call vundle#scripts#view('search',info, vundle#scripts#vundle_names(reverse(matches)))
redraw! redraw!
echo len(matches).' bundles found'
echo len(matches).' vundles found'
endf endf
func! vundle#scripts#reload() abort func! vundle#scripts#reload() abort
silent exec ':BundleSearch! '.(exists('b:match') ? b:match : '')
silent exec ':VundleSearch! '.(exists('b:match') ? b:match : '')
redraw! redraw!
endf endf
@ -33,8 +33,8 @@ func! s:view_log()
wincmd P | wincmd H wincmd P | wincmd H
endf endf
func vundle#scripts#bundle_names(names)
return map(copy(a:names), ' printf("Bundle ' ."'%s'".'", v:val) ')
func vundle#scripts#vundle_names(names)
return map(copy(a:names), ' printf("Vundle ' ."'%s'".'", v:val) ')
endf endf
func! vundle#scripts#view(title, headers, results) func! vundle#scripts#view(title, headers, results)
@ -59,16 +59,16 @@ func! vundle#scripts#view(title, headers, results)
setl ft=vundle setl ft=vundle
setl syntax=vim setl syntax=vim
syn keyword vimCommand Bundle
syn keyword vimCommand Vundle
syn keyword vimCommand Helptags syn keyword vimCommand Helptags
com! -buffer -bang -nargs=1 DeleteBundle
com! -buffer -bang -nargs=1 DeleteVundle
\ call vundle#installer#run('vundle#installer#delete', split(<q-args>,',')[0], ['!' == '<bang>', <args>]) \ call vundle#installer#run('vundle#installer#delete', split(<q-args>,',')[0], ['!' == '<bang>', <args>])
com! -buffer -bang -nargs=? InstallAndRequireBundle
com! -buffer -bang -nargs=? InstallAndRequireVundle
\ call vundle#installer#run('vundle#installer#install_and_require', split(<q-args>,',')[0], ['!' == '<bang>', <q-args>]) \ call vundle#installer#run('vundle#installer#install_and_require', split(<q-args>,',')[0], ['!' == '<bang>', <q-args>])
com! -buffer -bang -nargs=? InstallBundle
com! -buffer -bang -nargs=? InstallVundle
\ call vundle#installer#run('vundle#installer#install', split(<q-args>,',')[0], ['!' == '<bang>', <q-args>]) \ call vundle#installer#run('vundle#installer#install', split(<q-args>,',')[0], ['!' == '<bang>', <q-args>])
com! -buffer -bang -nargs=0 InstallHelptags com! -buffer -bang -nargs=0 InstallHelptags
@ -81,19 +81,19 @@ func! vundle#scripts#view(title, headers, results)
nnoremap <buffer> D :exec 'Delete'.getline('.')<CR> nnoremap <buffer> D :exec 'Delete'.getline('.')<CR>
nnoremap <buffer> add :exec 'Install'.getline('.')<CR> nnoremap <buffer> add :exec 'Install'.getline('.')<CR>
nnoremap <buffer> add! :exec 'Install'.substitute(getline('.'), '^Bundle ', 'Bundle! ', '')<CR>
nnoremap <buffer> add! :exec 'Install'.substitute(getline('.'), '^Vundle ', 'Vundle! ', '')<CR>
nnoremap <buffer> i :exec 'InstallAndRequire'.getline('.')<CR> nnoremap <buffer> i :exec 'InstallAndRequire'.getline('.')<CR>
nnoremap <buffer> I :exec 'InstallAndRequire'.substitute(getline('.'), '^Bundle ', 'Bundle! ', '')<CR>
nnoremap <buffer> I :exec 'InstallAndRequire'.substitute(getline('.'), '^Vundle ', 'Vundle! ', '')<CR>
nnoremap <buffer> l :VundleLog<CR> nnoremap <buffer> l :VundleLog<CR>
nnoremap <buffer> h :h vundle<CR> nnoremap <buffer> h :h vundle<CR>
nnoremap <buffer> ? :norm h<CR> nnoremap <buffer> ? :norm h<CR>
nnoremap <buffer> c :BundleClean<CR>
nnoremap <buffer> C :BundleClean!<CR>
nnoremap <buffer> c :VundleClean<CR>
nnoremap <buffer> C :VundleClean!<CR>
nnoremap <buffer> s :BundleSearch
nnoremap <buffer> s :VundleSearch
nnoremap <buffer> R :call vundle#scripts#reload()<CR> nnoremap <buffer> R :call vundle#scripts#reload()<CR>
" goto first line after headers " goto first line after headers
@ -130,7 +130,7 @@ func! s:fetch_scripts(to)
endf endf
func! s:load_scripts(bang) func! s:load_scripts(bang)
let f = expand(g:bundle_dir.'/.vundle/script-names.vim-scripts.org.json')
let f = expand(g:vundle_dir.'/.vundle/script-names.vim-scripts.org.json')
if a:bang || !filereadable(f) if a:bang || !filereadable(f)
if 0 != s:fetch_scripts(f) if 0 != s:fetch_scripts(f)
return [] return []


+ 58
- 58
doc/vundle.txt View File

@ -21,14 +21,14 @@ CONTENTS ~
ABOUT *vundle-about* ABOUT *vundle-about*
Vundle is a short cut for Vim bundle and is the Vim plug-in manager.
Vundle is a short cut for Vim vundle and is the Vim plug-in manager.
2. WHY VUNDLE ~ 2. WHY VUNDLE ~
*vundle-why-vundle* *vundle-why-vundle*
Vundle allows to: Vundle allows to:
- keep track and configure your scripts right in `.vimrc` - keep track and configure your scripts right in `.vimrc`
- install configured scripts (aka bundle)
- install configured scripts (aka vundle)
- update configured scripts - update configured scripts
- search [all available vim scripts] by name - search [all available vim scripts] by name
- clean up from unused scripts - clean up from unused scripts
@ -47,7 +47,7 @@ in order to install/search [all available vim scripts]
git clone http://github.com/gmarik/vundle.git ~/.vim/vundle.git git clone http://github.com/gmarik/vundle.git ~/.vim/vundle.git
2) Configure bundles:
2) Configure vundles:
Sample `.vimrc`: > Sample `.vimrc`: >
@ -58,123 +58,123 @@ in order to install/search [all available vim scripts]
call vundle#rc() call vundle#rc()
" let Vundle manage Vundle " let Vundle manage Vundle
Bundle 'gmarik/vundle'
Vundle 'gmarik/vundle'
" My Bundles here:
" My Vundles here:
" "
" original repos on github " original repos on github
Bundle 'tpope/vim-fugitive'
Bundle 'Lokaltog/vim-easymotion'
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
Vundle 'tpope/vim-fugitive'
Vundle 'Lokaltog/vim-easymotion'
Vundle 'rstacruz/sparkup', {'rtp': 'vim/'}
" vim-scripts repos " vim-scripts repos
Bundle 'L9'
Bundle 'FuzzyFinder'
Bundle 'rails.vim'
Vundle 'L9'
Vundle 'FuzzyFinder'
Vundle 'rails.vim'
" non github repos " non github repos
Bundle 'git://git.wincent.com/command-t.git'
Vundle 'git://git.wincent.com/command-t.git'
" ... " ...
filetype plugin indent on " required! filetype plugin indent on " required!
" or " or
" filetype plugin on " to not use the indentation settings set by plugins " filetype plugin on " to not use the indentation settings set by plugins
3) Install configured bundles:
3) Install configured vundles:
Launch `vim`, run > Launch `vim`, run >
:BundleInstall
:VundleInstall
Installing requires [Git] and triggers [Git clone](http://gitref.org/creating/#clone) for Installing requires [Git] and triggers [Git clone](http://gitref.org/creating/#clone) for
each configured repo to `~/.vim/bundle/`.
each configured repo to `~/.vim/vundle/`.
4. SCRIPTS ~ 4. SCRIPTS ~
*vundle-scripts* *vundle-scripts*
4.1 CONFIGURE SCRIPTS ~ 4.1 CONFIGURE SCRIPTS ~
*vundle-scripts-configure* *Bundle*
Before installing scripts they need to be configured. It's done using `Bundle`
*vundle-scripts-configure* *Vundle*
Before installing scripts they need to be configured. It's done using `Vundle`
command in `.vimrc`: > command in `.vimrc`: >
Bundle 'git_repo_uri' " 'git_repo_uri' should be a valid uri to git repository
Vundle 'git_repo_uri' " 'git_repo_uri' should be a valid uri to git repository
or > or >
Bundle 'script_name' " 'script-name' should be an official script name (see |vundle-scripts-search| )
Vundle 'script_name' " 'script-name' should be an official script name (see |vundle-scripts-search| )
Vundle loves Github, that's why short uris can be used with commands: > Vundle loves Github, that's why short uris can be used with commands: >
Bundle 'tpope/vim-fugitive'
Vundle 'tpope/vim-fugitive'
equals full uri > equals full uri >
Bundle 'http://github.com/tpope/vim-fugitive.git'
Vundle 'http://github.com/tpope/vim-fugitive.git'
NOTE: Vundle defaults to http:// protocol for the short URIs NOTE: Vundle defaults to http:// protocol for the short URIs
4.2 INSTALL SCRIPTS ~ 4.2 INSTALL SCRIPTS ~
*vundle-scripts-install* *BundleInstall*
*vundle-scripts-install* *VundleInstall*
run > run >
:BundleInstall
:VundleInstall
installs configured scripts. Newly installed scripts will be automatically installs configured scripts. Newly installed scripts will be automatically
enabled. Except special cases requiring compilation or pre-configuration. enabled. Except special cases requiring compilation or pre-configuration.
BundleInstall allows to install scripts by name:>
VundleInstall allows to install scripts by name:>
:BundleInstall unite.vim
:VundleInstall unite.vim
installs and activates unite.vim. You can use Tab to auto-complete known script names. installs and activates unite.vim. You can use Tab to auto-complete known script names.
NOTE: installation, as just described, doesn't automatically configure scripts; NOTE: installation, as just described, doesn't automatically configure scripts;
you have to configure them manually. you have to configure them manually.
4.3 UPDATE SCRIPTS ~ 4.3 UPDATE SCRIPTS ~
*vundle-scripts-update* *BundleInstall!*
*vundle-scripts-update* *VundleInstall!*
run > run >
:BundleInstall! " NOTE: bang(!)
:VundleInstall! " NOTE: bang(!)
installs or updates configured scripts. installs or updates configured scripts.
4.4 SEARCHING ~ 4.4 SEARCHING ~
*vundle-scripts-search* *BundleSearch*
*vundle-scripts-search* *VundleSearch*
run > run >
:BundleSearch foo
:VundleSearch foo
lists bundles matching 'foo' in new a new split window, ie:
lists vundles matching 'foo' in new a new split window, ie:
> >
Bundle "VimFootnotes"
Bundle "foo.vim"
Vundle "VimFootnotes"
Vundle "foo.vim"
> >
and > and >
:BundleSearch! foo
:VundleSearch! foo
refreshes script list before performing actual search. refreshes script list before performing actual search.
If command is run without argument: > If command is run without argument: >
:BundleSearch!
:VundleSearch!
it will display all known scripts it will display all known scripts
Searching requires [`curl`](http://curl.haxx.se/) Searching requires [`curl`](http://curl.haxx.se/)
4.5 LISTING BUNDLES ~
*vundle-scripts-list* *BundleList*
4.5 LISTING vundleS ~
*vundle-scripts-list* *VundleList*
To quickly pull list of configured bundles use >
To quickly pull list of configured vundles use >
:BundleList
:VundleList
4.6 CLEANING UP ~ 4.6 CLEANING UP ~
*vundle-scripts-cleanup* *BundleClean*
*vundle-scripts-cleanup* *VundleClean*
run > run >
:BundleClean
:VundleClean
requires confirmation before removal of unused script-dirs from your `.vim/bundle`.
requires confirmation before removal of unused script-dirs from your `.vim/vundle`.
*BundleClean!*
*VundleClean!*
> >
:BundleClean!
:VundleClean!
removes unused scripts with no questions. removes unused scripts with no questions.
@ -184,24 +184,24 @@ removes unused scripts with no questions.
Vundle provides simple interactive mode to help you explore new scripts easily. Vundle provides simple interactive mode to help you explore new scripts easily.
Interactive mode is available as result of any commands that display list of Interactive mode is available as result of any commands that display list of
bundles. For instance, running: >
vundles. For instance, running: >
:BundleSearch! unite
:VundleSearch! unite
triggers search for scripts matching 'unite' and yields a split window with triggers search for scripts matching 'unite' and yields a split window with
content: > content: >
"Keymap: i - Install bundle; c - Cleanup; r - Refine list; R - Reload list
"Keymap: i - Install vundle; c - Cleanup; r - Refine list; R - Reload list
"Search results for: unite "Search results for: unite
Bundle 'unite.vim'
Bundle 'unite-yarm'
Bundle 'unite-gem'
Bundle 'unite-locate'
Bundle 'unite-font'
Bundle 'unite-colorscheme'
Vundle 'unite.vim'
Vundle 'unite-yarm'
Vundle 'unite-gem'
Vundle 'unite-locate'
Vundle 'unite-font'
Vundle 'unite-colorscheme'
As the first line(starting with `"Keymap:`) shows, certain actions may be applied As the first line(starting with `"Keymap:`) shows, certain actions may be applied
to selected bundles . Move cursor over line `Bundle 'unite.vim'` and press i
to selected vundles . Move cursor over line `Vundle 'unite.vim'` and press i
key(install, see |vundle-keymappings| for more details). key(install, see |vundle-keymappings| for more details).
After unite.vim is installed - `:Unite file` command should be After unite.vim is installed - `:Unite file` command should be
available to prove 'unite.vim' availability. available to prove 'unite.vim' availability.
@ -213,11 +213,11 @@ NOTE: Interactive installation doesn't update your .vimrc configuration.
KEY | DESCRIPTION KEY | DESCRIPTION
----|-------------------------- > ----|-------------------------- >
i | run :BundleInstall with name taken from line cursor is positioned on
I | same as i, but runs :BundleInstall! to update bundle
D | delete selected bundle( be careful not to remove local modifications)
c | run :BundleClean
s | run :BundleSearch
i | run :VundleInstall with name taken from line cursor is positioned on
I | same as i, but runs :VundleInstall! to update vundle
D | delete selected vundle( be careful not to remove local modifications)
c | run :VundleClean
s | run :VundleSearch
R | fetch fresh script list from server R | fetch fresh script list from server


+ 2
- 2
test/minirc.vim View File

@ -1,8 +1,8 @@
set nocompatible set nocompatible
syntax on syntax on
filetype off filetype off
set rtp+=~/.vim/bundle/vundle/
set rtp+=~/.vim/vundle/vundle/
call vundle#rc() call vundle#rc()
Bundle 'gmarik/vundle'
Vundle 'gmarik/vundle'
filetype plugin indent on filetype plugin indent on

+ 20
- 20
test/vimrc View File

@ -1,9 +1,9 @@
" vim -u test/vimrc " vim -u test/vimrc
set nocompatible set nocompatible
let root = '/tmp/vundle_bundles/'
let root = '/tmp/vundle_vundles/'
let src = 'http://github.com/gmarik/vundle.git' let src = 'http://github.com/gmarik/vundle.git'
" let src = '~/.vim/bundle/vundle/.git'
" let src = '~/.vim/vundle/vundle/.git'
if !isdirectory(expand(root).'/vundle') if !isdirectory(expand(root).'/vundle')
exec '!git clone '.src.' '.root.'/vundle' exec '!git clone '.src.' '.root.'/vundle'
@ -18,53 +18,53 @@ exec 'set rtp+='.root.'/vundle'
call vundle#rc(root) call vundle#rc(root)
Bundle "gmarik/vundle"
Vundle "gmarik/vundle"
" vim-scripts name " vim-scripts name
Bundle 'molokai'
Vundle 'molokai'
" github username with dashes " github username with dashes
Bundle 'vim-scripts/ragtag.vim'
Vundle 'vim-scripts/ragtag.vim'
" original repo " original repo
Bundle 'altercation/vim-colors-solarized'
Vundle 'altercation/vim-colors-solarized'
" with extension " with extension
Bundle 'nelstrom/vim-mac-classic-theme.git'
Vundle 'nelstrom/vim-mac-classic-theme.git'
" "
" invalid uri " invalid uri
Bundle 'nonexistinguser/yupppierepo.git'
Vundle 'nonexistinguser/yupppierepo.git'
" full uri " full uri
Bundle 'https://github.com/vim-scripts/vim-game-of-life'
Vundle 'https://github.com/vim-scripts/vim-game-of-life'
" full uri " full uri
Bundle 'git@github.com:gmarik/ingretu.git'
Vundle 'git@github.com:gmarik/ingretu.git'
" short uri " short uri
Bundle 'gh:gmarik/snipmate.vim.git'
Bundle 'github:mattn/gist-vim.git'
Vundle 'gh:gmarik/snipmate.vim.git'
Vundle 'github:mattn/gist-vim.git'
" local uri stuff " local uri stuff
Bundle '~/Dropbox/.gitrepos/utilz.vim.git'
" Bundle 'file://Dropbox/.gitrepos/utilz.vim.git'
Vundle '~/Dropbox/.gitrepos/utilz.vim.git'
" Vundle 'file://Dropbox/.gitrepos/utilz.vim.git'
" with options " with options
Bundle 'rstacruz/sparkup.git', {'rtp': 'vim/'}
Vundle 'rstacruz/sparkup.git', {'rtp': 'vim/'}
" Camel case " Camel case
Bundle 'vim-scripts/RubySinatra'
Vundle 'vim-scripts/RubySinatra'
filetype plugin indent on " Automatically detect file types. filetype plugin indent on " Automatically detect file types.
set wildignore+=doc " should not break helptags set wildignore+=doc " should not break helptags
set wildignore+=.git " should not break clone set wildignore+=.git " should not break clone
BundleInstall
VundleInstall
func! s:assert_bundles() abort
for b in g:bundles
func! s:assert_vundles() abort
for b in g:vundles
if (!isdirectory(b.path().'/.git/')) if (!isdirectory(b.path().'/.git/'))
throw b.name.' not installed' throw b.name.' not installed'
endif endif
endfor endfor
endf endf
call s:assert_bundles()
call s:assert_vundles()

Loading…
Cancel
Save