Browse Source

Merge d3bd407069 into cae6df72cf

pull/86/merge
GitHub Merge Button 15 years ago
parent
commit
63864ae046
8 changed files with 212 additions and 196 deletions
  1. +25
    -25
      README.md
  2. +10
    -10
      autoload/vundle.vim
  3. +22
    -19
      autoload/vundle/config.vim
  4. +49
    -36
      autoload/vundle/installer.vim
  5. +19
    -19
      autoload/vundle/scripts.vim
  6. +64
    -64
      doc/vundle.txt
  7. +2
    -2
      test/minirc.vim
  8. +21
    -21
      test/vimrc

+ 25
- 25
README.md View File

@ -9,10 +9,10 @@
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`:
@ -20,54 +20,54 @@
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
set rtp+=~/.vim/vundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
" required!
Vundle 'gmarik/vundle'
" My Bundles here:
" My Vundles here:
"
" 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
Bundle 'L9'
Bundle 'FuzzyFinder'
Bundle 'rails.vim'
Vundle 'L9'
Vundle 'FuzzyFinder'
Vundle 'rails.vim'
" 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
" :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
" 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)
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
[Vundle] allows to:
- keep track and configure your scripts right in `.vimrc`
- [install] configured scripts (aka bundle)
- [install] configured scripts (aka bundle)
- [update] configured scripts
- [search] by name [all available vim scripts]
- [clean] unused scripts up
@ -117,10 +117,10 @@ see [wiki](/gmarik/vundle/wiki)
## TODO:
[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
* √ vim documentation
* √ put vundle to bundles/ too(will fix vundle help)
* √ put vundle to vundles/ too(will fix vundle help)
* √ tests
* √ improve error handling
* 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
" 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>)
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>)
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>)
com! -nargs=0 -bang BundleList
com! -nargs=0 -bang VundleList
\ call vundle#installer#list('!'=='<bang>')
com! -nargs=? -bang BundleClean
com! -nargs=? -bang VundleClean
\ 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'))
@ -36,7 +36,7 @@ endif
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 = []
call vundle#config#init()
endf

+ 22
- 19
autoload/vundle/config.vim View File

@ -1,30 +1,33 @@
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 add(g:bundles, bundle)
call add(g:vundles, vundle)
call s:rtp_add_a()
endf
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()
let g:bundles = []
let g:vundles = []
if !exists('g:Vundle_no_full_repo')
let g:Vundle_no_full_repo=0
endif
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(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.'/after/*.vim'
call s:rtp_rm(g:bundle_dir)
call s:rtp_rm(g:vundle_dir)
endfor
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')))
return extend(opts, copy(s:bundle))
return extend(opts, copy(s:vundle))
endf
func! s:parse_options(opts)
@ -48,7 +51,7 @@ func! s:parse_name(arg)
let uri .= '.git'
endif
let name = substitute(split(uri,'\/')[-1], '\.git\s*$','','i')
elseif arg =~? '^\s*\(git@\|git://\)\S\+'
elseif arg =~? '^\s*\(git@\|git://\)\S\+'
\ || arg =~? '\(file\|https\?\)://'
\ || arg =~? '\.git\s*$'
let uri = arg
@ -61,11 +64,11 @@ func! s:parse_name(arg)
endf
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
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
func! s:rtp_rm(dir) abort
@ -82,12 +85,12 @@ func! s:expand_path(path) abort
return simplify(expand(a:path))
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
func! s:bundle.rtpath()
func! s:vundle.rtpath()
return has_key(self, 'rtp') ? s:expand_path(self.path().'/'.self.rtp) : self.path()
endf

+ 49
- 36
autoload/vundle/installer.vim View File

@ -1,14 +1,14 @@
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 vundle#config#require(bundles)
call vundle#config#require(vundles)
endf
@ -53,7 +53,7 @@ func! vundle#installer#run(func_name, name, ...) abort
redraw!
if 'updated' == status
if 'updated' == status
echo n.' installed'
elseif 'todate' == status
echo n.' already installed'
@ -73,7 +73,7 @@ func! vundle#installer#run(func_name, name, ...) abort
return status
endf
func! s:sign(status)
func! s:sign(status)
if (!has('signs'))
return
endif
@ -83,57 +83,57 @@ endf
func! vundle#installer#install_and_require(bang, name) abort
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])
return result
endf
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)
endf
func! vundle#installer#docs() abort
call vundle#installer#helptags(g:bundles)
call vundle#installer#helptags(g:vundles)
return 'updated'
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('Helptags:')
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
endf
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!
echo len(g:bundles).' bundles configured'
echo len(g:vundles).' vundles configured'
endf
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)
let headers = ['" All clean!']
let names = []
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
call vundle#scripts#view('clean', headers, names)
@ -151,13 +151,13 @@ func! vundle#installer#delete(bang, dir_name) abort
\ 'rmdir /S /Q' :
\ '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)
call s:log('')
call s:log('Bundle '.a:dir_name)
call s:log('Vundle '.a:dir_name)
call s:log('$ '.cmd)
call s:log('> '.out)
@ -184,25 +184,38 @@ func! s:helptags(rtp) abort
endtry
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 !(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'))
let cmd = substitute(cmd, '^cd ','cd /d ','') " add /d switch to change drives
let cmd = '"'.cmd.'"' " enclose in quotes
endif
else
let cmd = 'git clone '.a:bundle.uri.' '.shellescape(a:bundle.path())
let cmd = 'git clone '.a:vundle.uri.' '.shellescape(a:vundle.path())
endif
let out = s:system(cmd)
call s:log('')
call s:log('Bundle '.a:bundle.name_spec)
call s:log('$ '.cmd)
call s:log('> '.out)
if (g:Vundle_no_full_repo) && (isdirectory(expand(a:vundle.path())))
let cmd = 'rm -rf '.shellescape(git_dir)
let tmp = s:system(cmd)
call s:log('')
call s:log('Vundle '.a:vundle.name_spec)
call s:log('# update skipped because of Vundle_no_full_repo')
let out = 'up-to-date'
else
let out = s:system(cmd)
call s:log('')
call s:log('Vundle '.a:vundle.name_spec)
call s:log('$ '.cmd)
call s:log('> '.out)
if (g:Vundle_no_full_repo)
let cmd = 'rm -rf '.shellescape(git_dir)
let tmp = s:system(cmd)
endif
endif
if 0 != v:shell_error
return 'error'


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

@ -1,6 +1,6 @@
func! vundle#scripts#all(bang, ...)
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)
if !empty(a:1)
let matches = filter(matches, 'v:val =~? "'.escape(a:1,'"').'"')
@ -8,13 +8,13 @@ func! vundle#scripts#all(bang, ...)
" TODO: highlight matches
let b:match = a:1
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!
echo len(matches).' bundles found'
echo len(matches).' vundles found'
endf
func! vundle#scripts#reload() abort
silent exec ':BundleSearch! '.(exists('b:match') ? b:match : '')
silent exec ':VundleSearch! '.(exists('b:match') ? b:match : '')
redraw!
endf
@ -33,8 +33,8 @@ func! s:view_log()
wincmd P | wincmd H
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
func! vundle#scripts#view(title, headers, results)
@ -54,24 +54,24 @@ func! vundle#scripts#view(title, headers, results)
setl noswapfile
setl cursorline
setl nonu ro noma ignorecase
setl nonu ro noma ignorecase
if (exists('&relativenumber')) | setl norelativenumber | endif
setl ft=vundle
setl syntax=vim
syn keyword vimCommand Bundle
syn keyword vimCommand Vundle
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>])
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>])
com! -buffer -bang -nargs=? InstallBundle
com! -buffer -bang -nargs=? InstallVundle
\ 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
\ call vundle#installer#run('vundle#installer#docs', 'helptags', [])
com! -buffer -nargs=0 VundleLog call s:view_log()
@ -81,19 +81,19 @@ func! vundle#scripts#view(title, headers, results)
nnoremap <buffer> D :exec 'Delete'.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'.substitute(getline('.'), '^Bundle ', 'Bundle! ', '')<CR>
nnoremap <buffer> I :exec 'InstallAndRequire'.substitute(getline('.'), '^Vundle ', 'Vundle! ', '')<CR>
nnoremap <buffer> l :VundleLog<CR>
nnoremap <buffer> h :h vundle<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>
" goto first line after headers
@ -112,7 +112,7 @@ func! s:fetch_scripts(to)
elseif executable("wget")
let temp = shellescape(tempname())
let cmd = 'wget -q -O '.temp.' '.l:vim_scripts_json. ' && mv -f '.temp.' '.shellescape(a:to)
if (has('win32') || has('win64'))
if (has('win32') || has('win64'))
let cmd = substitute(cmd, 'mv -f ', 'mv /Y ') " change force flag
let cmd = '"'.cmd.'"' " enclose in quotes so && joined cmds work
end
@ -130,7 +130,7 @@ func! s:fetch_scripts(to)
endf
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 0 != s:fetch_scripts(f)
return []


+ 64
- 64
doc/vundle.txt View File

@ -21,14 +21,14 @@ CONTENTS ~
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 ~
*vundle-why-vundle*
Vundle allows to:
- keep track and configure your scripts right in `.vimrc`
- install configured scripts (aka bundle)
- install configured scripts (aka vundle)
- update configured scripts
- search [all available vim scripts] by name
- clean up from unused scripts
@ -38,7 +38,7 @@ Also *Vundle* :
- manages runtime path of your installed scripts
- regenerates helptags automatically
Vundle takes advantage of [vim-scripts.org](http://vim-scripts.org)
Vundle takes advantage of [vim-scripts.org](http://vim-scripts.org)
in order to install/search [all available vim scripts]
3. QUICK START ~
@ -47,134 +47,134 @@ in order to install/search [all available vim scripts]
git clone http://github.com/gmarik/vundle.git ~/.vim/vundle.git
2) Configure bundles:
2) Configure vundles:
Sample `.vimrc`: >
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/vundle.git/
set rtp+=~/.vim/vundle.git/
call vundle#rc()
" let Vundle manage Vundle
Bundle 'gmarik/vundle'
Vundle 'gmarik/vundle'
" My Bundles here:
" My Vundles here:
"
" 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
Bundle 'L9'
Bundle 'FuzzyFinder'
Bundle 'rails.vim'
Vundle 'L9'
Vundle 'FuzzyFinder'
Vundle 'rails.vim'
" non github repos
Bundle 'git://git.wincent.com/command-t.git'
Vundle 'git://git.wincent.com/command-t.git'
" ...
filetype plugin indent on " required!
" or
" or
" filetype plugin on " to not use the indentation settings set by plugins
3) Install configured bundles:
3) Install configured vundles:
Launch `vim`, run >
:BundleInstall
:VundleInstall
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/`.
4. SCRIPTS ~
*vundle-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`: >
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 >
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: >
Bundle 'tpope/vim-fugitive'
Vundle 'tpope/vim-fugitive'
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
4.2 INSTALL SCRIPTS ~
*vundle-scripts-install* *BundleInstall*
*vundle-scripts-install* *VundleInstall*
run >
:BundleInstall
:VundleInstall
installs configured scripts. Newly installed scripts will be automatically
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.
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.
4.3 UPDATE SCRIPTS ~
*vundle-scripts-update* *BundleInstall!*
*vundle-scripts-update* *VundleInstall!*
run >
:BundleInstall! " NOTE: bang(!)
:VundleInstall! " NOTE: bang(!)
installs or updates configured scripts.
4.4 SEARCHING ~
*vundle-scripts-search* *BundleSearch*
*vundle-scripts-search* *VundleSearch*
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 >
:BundleSearch! foo
:VundleSearch! foo
refreshes script list before performing actual search.
If command is run without argument: >
:BundleSearch!
:VundleSearch!
it will display all known scripts
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 ~
*vundle-scripts-cleanup* *BundleClean*
*vundle-scripts-cleanup* *VundleClean*
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.
@ -184,25 +184,25 @@ removes unused scripts with no questions.
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
bundles. For instance, running: >
vundles. For instance, running: >
:BundleSearch! unite
:VundleSearch! unite
triggers search for scripts matching 'unite' and yields a split window with
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
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
to selected bundles . Move cursor over line `Bundle 'unite.vim'` and press i
key(install, see |vundle-keymappings| for more details).
to selected vundles . Move cursor over line `Vundle 'unite.vim'` and press i
key(install, see |vundle-keymappings| for more details).
After unite.vim is installed - `:Unite file` command should be
available to prove 'unite.vim' availability.
@ -213,11 +213,11 @@ NOTE: Interactive installation doesn't update your .vimrc configuration.
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


+ 2
- 2
test/minirc.vim View File

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

+ 21
- 21
test/vimrc View File

@ -1,9 +1,9 @@
" vim -u test/vimrc
set nocompatible
let root = '/tmp/vundle_bundles/'
let src = 'http://github.com/gmarik/vundle.git'
" let src = '~/.vim/bundle/vundle/.git'
let root = '/tmp/vundle_vundles/'
let src = 'http://github.com/gmarik/vundle.git'
" let src = '~/.vim/vundle/vundle/.git'
if !isdirectory(expand(root).'/vundle')
exec '!git clone '.src.' '.root.'/vundle'
@ -18,53 +18,53 @@ exec 'set rtp+='.root.'/vundle'
call vundle#rc(root)
Bundle "gmarik/vundle"
Vundle "gmarik/vundle"
" vim-scripts name
Bundle 'molokai'
Vundle 'molokai'
" github username with dashes
Bundle 'vim-scripts/ragtag.vim'
Vundle 'vim-scripts/ragtag.vim'
" original repo
Bundle 'altercation/vim-colors-solarized'
Vundle 'altercation/vim-colors-solarized'
" with extension
Bundle 'nelstrom/vim-mac-classic-theme.git'
Vundle 'nelstrom/vim-mac-classic-theme.git'
"
" invalid uri
Bundle 'nonexistinguser/yupppierepo.git'
Vundle 'nonexistinguser/yupppierepo.git'
" full uri
Bundle 'https://github.com/vim-scripts/vim-game-of-life'
Vundle 'https://github.com/vim-scripts/vim-game-of-life'
" full uri
Bundle 'git@github.com:gmarik/ingretu.git'
Vundle 'git@github.com:gmarik/ingretu.git'
" 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
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
Bundle 'rstacruz/sparkup.git', {'rtp': 'vim/'}
Vundle 'rstacruz/sparkup.git', {'rtp': 'vim/'}
" Camel case
Bundle 'vim-scripts/RubySinatra'
Vundle 'vim-scripts/RubySinatra'
filetype plugin indent on " Automatically detect file types.
set wildignore+=doc " should not break helptags
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/'))
throw b.name.' not installed'
endif
endfor
endf
call s:assert_bundles()
call s:assert_vundles()

Loading…
Cancel
Save