use Plugin instead Bundle
- closes many issues )
This commit is contained in:
parent
941158665e
commit
0521de95ea
66
README.md
66
README.md
@ -6,11 +6,11 @@
|
||||
|
||||
[Vundle] allows you to...
|
||||
|
||||
* keep track of and configure your scripts right in the `.vimrc`
|
||||
* [install] configured scripts (a.k.a. bundle)
|
||||
* [update] configured scripts
|
||||
* keep track of and [configure] your plugins right in the `.vimrc`
|
||||
* [install] configured plugins (a.k.a. scripts/bundle)
|
||||
* [update] configured plugins
|
||||
* [search] by name all available [Vim scripts]
|
||||
* [clean] unused scripts up
|
||||
* [clean] unused plugins up
|
||||
* run the above actions in a *single keypress* with [interactive mode]
|
||||
|
||||
[Vundle] automatically...
|
||||
@ -18,6 +18,8 @@
|
||||
* manages the [runtime path] of your installed scripts
|
||||
* regenerates [help tags] after installing and updating
|
||||
|
||||
[Vundle] is undergoing an [interface change], please stay up to date to get latest changes.
|
||||
|
||||
![Vundle-installer](http://25.media.tumblr.com/tumblr_m8m96w06G81r39828o1_1280.png)
|
||||
|
||||
## Quick Start
|
||||
@ -33,9 +35,9 @@
|
||||
|
||||
`$ git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle`
|
||||
|
||||
3. Configure Bundles:
|
||||
3. Configure Plugins:
|
||||
|
||||
Put this at the top of your `.vimrc` to use Vundle. Remove bundles you don't need, they are for illustration purposes.
|
||||
Put this at the top of your `.vimrc` to use Vundle. Remove plugins you don't need, they are for illustration purposes.
|
||||
|
||||
```vim
|
||||
set nocompatible " be iMproved, required
|
||||
@ -44,29 +46,29 @@
|
||||
" set the runtime path to include Vundle and initialize
|
||||
set rtp+=~/.vim/bundle/vundle/
|
||||
call vundle#rc()
|
||||
" alternatively, pass a path where Vundle should install bundles
|
||||
" alternatively, pass a path where Vundle should install plugins
|
||||
"let path = '~/some/path/here'
|
||||
"call vundle#rc(path)
|
||||
|
||||
" let Vundle manage Vundle, required
|
||||
Bundle 'gmarik/vundle'
|
||||
Plugin 'gmarik/vundle'
|
||||
|
||||
" The following are examples of different formats supported.
|
||||
" Keep bundle commands between here and filetype plugin indent on.
|
||||
" Keep Plugin commands between here and filetype plugin indent on.
|
||||
" scripts on GitHub repos
|
||||
Bundle 'tpope/vim-fugitive'
|
||||
Bundle 'Lokaltog/vim-easymotion'
|
||||
Bundle 'tpope/vim-rails.git'
|
||||
Plugin 'tpope/vim-fugitive'
|
||||
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.
|
||||
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
|
||||
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
|
||||
" scripts from http://vim-scripts.org/vim/scripts.html
|
||||
Bundle 'L9'
|
||||
Bundle 'FuzzyFinder'
|
||||
Plugin 'L9'
|
||||
Plugin 'FuzzyFinder'
|
||||
" scripts not on GitHub
|
||||
Bundle 'git://git.wincent.com/command-t.git'
|
||||
Plugin 'git://git.wincent.com/command-t.git'
|
||||
" git repos on your local machine (i.e. when working on your own plugin)
|
||||
Bundle 'file:///home/gmarik/path/to/plugin'
|
||||
Plugin 'file:///home/gmarik/path/to/plugin'
|
||||
" ...
|
||||
|
||||
filetype plugin indent on " required
|
||||
@ -74,21 +76,21 @@
|
||||
"filetype plugin on
|
||||
"
|
||||
" 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
|
||||
" :PluginList - list configured plugins
|
||||
" :PluginInstall(!) - install (update) plugins
|
||||
" :PluginSearch(!) foo - search (or refresh cache first) for foo
|
||||
" :PluginClean(!) - confirm (or auto-approve) removal of unused plugins
|
||||
"
|
||||
" see :h vundle for more details or wiki for FAQ
|
||||
" NOTE: comments after Bundle commands are not allowed.
|
||||
" NOTE: comments after Plugin commands are not allowed.
|
||||
" Put your stuff after this line
|
||||
```
|
||||
|
||||
4. Install Bundles:
|
||||
4. Install Plugins:
|
||||
|
||||
Launch `vim` and run `:BundleInstall`
|
||||
Launch `vim` and run `:PluginInstall`
|
||||
|
||||
To install from command line: `vim +BundleInstall +qall`
|
||||
To install from command line: `vim +PluginInstall +qall`
|
||||
|
||||
## Docs
|
||||
|
||||
@ -118,7 +120,7 @@ see [Vundle contributors](https://github.com/gmarik/vundle/graphs/contributors)
|
||||
## TODO:
|
||||
[Vundle] is a work in progress, so any ideas and patches are appreciated.
|
||||
|
||||
* ✓ activate newly added bundles on `.vimrc` reload or after `:BundleInstall`
|
||||
* ✓ activate newly added bundles on `.vimrc` reload or after `:PluginInstall`
|
||||
* ✓ use preview window for search results
|
||||
* ✓ Vim documentation
|
||||
* ✓ put Vundle in `bundles/` too (will fix Vundle help)
|
||||
@ -141,8 +143,10 @@ see [Vundle contributors](https://github.com/gmarik/vundle/graphs/contributors)
|
||||
[help tags]:http://vimdoc.sourceforge.net/htmldoc/helphelp.html#:helptags
|
||||
[runtime path]:http://vimdoc.sourceforge.net/htmldoc/options.html#%27runtimepath%27
|
||||
|
||||
[install]:https://github.com/gmarik/vundle/blob/master/doc/vundle.txt#L179-198
|
||||
[update]:https://github.com/gmarik/vundle/blob/master/doc/vundle.txt#L200-209
|
||||
[search]:https://github.com/gmarik/vundle/blob/master/doc/vundle.txt#L211-238
|
||||
[clean]:https://github.com/gmarik/vundle/blob/master/doc/vundle.txt#L247-260
|
||||
[interactive mode]:https://github.com/gmarik/vundle/blob/master/doc/vundle.txt#L263-303
|
||||
[configure]:https://github.com/gmarik/vundle/blob/master/doc/vundle.txt#L122-L205
|
||||
[install]:https://github.com/gmarik/vundle/blob/master/doc/vundle.txt#L207-L226
|
||||
[update]:https://github.com/gmarik/vundle/blob/master/doc/vundle.txt#L228-L237
|
||||
[search]:https://github.com/gmarik/vundle/blob/master/doc/vundle.txt#L239-L267
|
||||
[clean]:https://github.com/gmarik/vundle/blob/master/doc/vundle.txt#L276-L289
|
||||
[interactive mode]:https://github.com/gmarik/vundle/blob/master/doc/vundle.txt#L292-L331
|
||||
[interface change]:https://github.com/gmarik/vundle/blob/master/doc/vundle.txt#L345-L369
|
||||
|
@ -4,6 +4,48 @@
|
||||
" Readme: http://github.com/gmarik/vundle/blob/master/README.md
|
||||
" Version: 0.9
|
||||
|
||||
" Plugin Commands
|
||||
com! -nargs=+ -bar Plugin
|
||||
\ call vundle#config#bundle(<args>)
|
||||
|
||||
com! -nargs=? -bang -complete=custom,vundle#scripts#complete PluginInstall
|
||||
\ call vundle#installer#new('!' == '<bang>', <q-args>)
|
||||
|
||||
com! -nargs=? -bang -complete=custom,vundle#scripts#complete PluginSearch
|
||||
\ call vundle#scripts#all('!'=='<bang>', <q-args>)
|
||||
|
||||
com! -nargs=? -bang -complete=custom,vundle#scripts#complete Plugins
|
||||
\ call vundle#scripts#all('!'=='<bang>', <q-args>)
|
||||
|
||||
com! -nargs=0 -bang PluginList
|
||||
\ call vundle#installer#list('!'=='<bang>')
|
||||
|
||||
com! -nargs=? -bang PluginClean
|
||||
\ call vundle#installer#clean('!' == '<bang>')
|
||||
|
||||
com! -nargs=0 PluginDocs
|
||||
\ call vundle#installer#helptags(g:bundles)
|
||||
|
||||
" Aliases
|
||||
com! PluginUpdate PluginInstall!
|
||||
|
||||
" Vundle Aliases
|
||||
com! -nargs=? -bang -complete=custom,vundle#scripts#complete VundleInstall
|
||||
\ call vundle#installer#new('!' == '<bang>', <q-args>)
|
||||
|
||||
com! -nargs=? -bang -complete=custom,vundle#scripts#complete VundleSearch
|
||||
\ call vundle#scripts#all('!'=='<bang>', <q-args>)
|
||||
|
||||
com! -nargs=? -bang VundleClean
|
||||
\ call vundle#installer#clean('!' == '<bang>')
|
||||
|
||||
com! -nargs=0 VundleDocs
|
||||
\ call vundle#installer#helptags(g:bundles)
|
||||
|
||||
" Aliases
|
||||
com! VundleUpdate PluginInstall!
|
||||
|
||||
" deprecated
|
||||
com! -nargs=+ Bundle
|
||||
\ call vundle#config#bundle(<args>)
|
||||
|
||||
@ -22,7 +64,7 @@ com! -nargs=0 -bang BundleList
|
||||
com! -nargs=? -bang BundleClean
|
||||
\ call vundle#installer#clean('!' == '<bang>')
|
||||
|
||||
com! -nargs=0 BundleDocs
|
||||
com! -nargs=0 BundleDocs
|
||||
\ call vundle#installer#helptags(g:bundles)
|
||||
|
||||
" Aliases
|
||||
|
@ -25,9 +25,9 @@ endf
|
||||
|
||||
func! vundle#config#init_bundle(name, opts)
|
||||
if a:name != substitute(a:name, '^\s*\(.\{-}\)\s*$', '\1', '')
|
||||
echo "Spurious leading and/or trailing whitespace found in bundle spec '" . a:name . "'"
|
||||
echo "Spurious leading and/or trailing whitespace found in plugin spec '" . a:name . "'"
|
||||
endif
|
||||
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')), 'keep')
|
||||
let b = extend(opts, copy(s:bundle))
|
||||
let b.rtpath = s:rtpath(opts)
|
||||
return b
|
||||
@ -55,7 +55,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
|
||||
|
@ -4,7 +4,7 @@ func! vundle#installer#new(bang, ...) abort
|
||||
\ map(copy(a:000), 'vundle#config#bundle(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, 1)], names + ['Helptags'])
|
||||
call vundle#scripts#view('Installer',['" Installing plugins to '.expand(g:bundle_dir, 1)], names + ['Helptags'])
|
||||
|
||||
call s:process(a:bang, (a:bang ? 'add!' : 'add'))
|
||||
|
||||
@ -30,7 +30,7 @@ func! s:process(bang, cmd)
|
||||
endif
|
||||
|
||||
if 'updated' == g:vundle_last_status && empty(msg)
|
||||
let msg = 'Bundles updated; press u to view changelog'
|
||||
let msg = 'Plugins updated; press u to view changelog'
|
||||
endif
|
||||
|
||||
" goto next one
|
||||
@ -81,7 +81,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
|
||||
@ -100,7 +100,14 @@ endf
|
||||
func! vundle#installer#install(bang, name) abort
|
||||
if !isdirectory(g:bundle_dir) | call mkdir(g:bundle_dir, 'p') | endif
|
||||
|
||||
let b = vundle#config#init_bundle(a:name, {})
|
||||
let n = substitute(a:name,"['".'"]\+','','g')
|
||||
let matched = filter(copy(g:bundles), 'v:val.name_spec == n')
|
||||
|
||||
if len(matched) > 0
|
||||
let b = matched[0]
|
||||
else
|
||||
let b = vundle#config#init_bundle(a:name, {})
|
||||
endif
|
||||
|
||||
return s:sync(a:bang, b)
|
||||
endf
|
||||
@ -123,21 +130,21 @@ func! vundle#installer#helptags(bundles) abort
|
||||
let statuses = map(copy(help_dirs), 's:helptags(v:val)')
|
||||
let errors = filter(statuses, 'v:val == 0')
|
||||
|
||||
call s:log('Helptags: '.len(help_dirs).' bundles processed')
|
||||
call s:log('Helptags: '.len(help_dirs).' plugins processed')
|
||||
|
||||
return len(errors)
|
||||
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)
|
||||
call vundle#scripts#view('list', ['" My Plugins'], bundles)
|
||||
redraw
|
||||
echo len(g:bundles).' bundles configured'
|
||||
echo len(g:bundles).' plugins configured'
|
||||
endf
|
||||
|
||||
|
||||
func! vundle#installer#clean(bang) abort
|
||||
let bundle_dirs = map(copy(g:bundles), 'v:val.path()')
|
||||
let bundle_dirs = map(copy(g:bundles), 'v:val.path()')
|
||||
let all_dirs = (v:version > 702 || (v:version == 702 && has("patch51")))
|
||||
\ ? split(globpath(g:bundle_dir, '*', 1), "\n")
|
||||
\ : split(globpath(g:bundle_dir, '*'), "\n")
|
||||
@ -147,7 +154,7 @@ func! vundle#installer#clean(bang) abort
|
||||
let headers = ['" All clean!']
|
||||
let names = []
|
||||
else
|
||||
let headers = ['" Removing bundles:']
|
||||
let headers = ['" Removing Plugins:']
|
||||
let names = vundle#scripts#bundle_names(map(copy(x_dirs), 'fnamemodify(v:val, ":t")'))
|
||||
end
|
||||
|
||||
@ -179,7 +186,7 @@ func! vundle#installer#delete(bang, dir_name) abort
|
||||
let out = s:system(cmd)
|
||||
|
||||
call s:log('')
|
||||
call s:log('Bundle '.a:dir_name)
|
||||
call s:log('Plugin '.a:dir_name)
|
||||
call s:log('$ '.cmd)
|
||||
call s:log('> '.out)
|
||||
|
||||
@ -229,7 +236,7 @@ func! s:sync(bang, bundle) abort
|
||||
|
||||
let out = s:system(cmd)
|
||||
call s:log('')
|
||||
call s:log('Bundle '.a:bundle.name_spec)
|
||||
call s:log('Plugin '.a:bundle.name_spec)
|
||||
call s:log('$ '.cmd)
|
||||
call s:log('> '.out)
|
||||
|
||||
|
@ -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 plugin; 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,'"').'"')
|
||||
@ -10,11 +10,11 @@ func! vundle#scripts#all(bang, ...)
|
||||
endif
|
||||
call vundle#scripts#view('search',info, vundle#scripts#bundle_names(reverse(matches)))
|
||||
redraw
|
||||
echo len(matches).' bundles found'
|
||||
echo len(matches).' plugins found'
|
||||
endf
|
||||
|
||||
func! vundle#scripts#reload() abort
|
||||
silent exec ':BundleSearch! '.(exists('b:match') ? b:match : '')
|
||||
silent exec ':PluginSearch! '.(exists('b:match') ? b:match : '')
|
||||
redraw
|
||||
endf
|
||||
|
||||
@ -48,7 +48,7 @@ func! s:create_changelog() abort
|
||||
let updates = system(cmd)
|
||||
|
||||
call add(g:vundle_changelog, '')
|
||||
call add(g:vundle_changelog, 'Updated Bundle: '.bundle.name)
|
||||
call add(g:vundle_changelog, 'Updated Plugin: '.bundle.name)
|
||||
|
||||
if bundle.uri =~ "https://github.com"
|
||||
call add(g:vundle_changelog, 'Compare at: '.bundle.uri[0:-5].'/compare/'.initial_sha.'...'.updated_sha)
|
||||
@ -75,7 +75,7 @@ func! s:view_changelog()
|
||||
endf
|
||||
|
||||
func! vundle#scripts#bundle_names(names)
|
||||
return map(copy(a:names), ' printf("Bundle ' ."'%s'".'", v:val) ')
|
||||
return map(copy(a:names), ' printf("Plugin ' ."'%s'".'", v:val) ')
|
||||
endf
|
||||
|
||||
func! vundle#scripts#view(title, headers, results)
|
||||
@ -89,7 +89,7 @@ func! vundle#scripts#view(title, headers, results)
|
||||
|
||||
let g:vundle_view = bufnr('%')
|
||||
"
|
||||
" make buffer modifiable
|
||||
" make buffer modifiable
|
||||
" to append without errors
|
||||
set modifiable
|
||||
|
||||
@ -99,24 +99,25 @@ func! vundle#scripts#view(title, headers, results)
|
||||
setl noswapfile
|
||||
|
||||
setl cursorline
|
||||
setl nonu ro noma ignorecase
|
||||
setl nonu ro noma
|
||||
if (exists('&relativenumber')) | setl norelativenumber | endif
|
||||
|
||||
setl ft=vundle
|
||||
setl syntax=vim
|
||||
syn keyword vimCommand Plugin
|
||||
syn keyword vimCommand Bundle
|
||||
syn keyword vimCommand Helptags
|
||||
|
||||
com! -buffer -bang -nargs=1 DeleteBundle
|
||||
com! -buffer -bang -nargs=1 DeletePlugin
|
||||
\ call vundle#installer#run('vundle#installer#delete', split(<q-args>,',')[0], ['!' == '<bang>', <args>])
|
||||
|
||||
com! -buffer -bang -nargs=? InstallAndRequireBundle
|
||||
com! -buffer -bang -nargs=? InstallAndRequirePlugin
|
||||
\ 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=? InstallPlugin
|
||||
\ 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()
|
||||
@ -127,10 +128,10 @@ 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('.'), '^Plugin ', 'Plugin! ', '')<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('.'), '^Plugin ', 'Plugin! ', '')<CR>
|
||||
|
||||
nnoremap <buffer> l :VundleLog<CR>
|
||||
nnoremap <buffer> u :VundleChangelog<CR>
|
||||
@ -140,7 +141,7 @@ func! vundle#scripts#view(title, headers, results)
|
||||
nnoremap <buffer> c :BundleClean<CR>
|
||||
nnoremap <buffer> C :BundleClean!<CR>
|
||||
|
||||
nnoremap <buffer> s :BundleSearch
|
||||
nnoremap <buffer> s :BundleSearch
|
||||
nnoremap <buffer> R :call vundle#scripts#reload()<CR>
|
||||
|
||||
" goto first line after headers
|
||||
@ -159,7 +160,7 @@ func! s:fetch_scripts(to)
|
||||
elseif executable("wget")
|
||||
let temp = vundle#installer#shellesc(tempname())
|
||||
let cmd = 'wget -q -O '.temp.' '.l:vim_scripts_json. ' && mv -f '.temp.' '.vundle#installer#shellesc(a:to)
|
||||
if (has('win32') || has('win64'))
|
||||
if (has('win32') || has('win64'))
|
||||
let cmd = substitute(cmd, 'mv -f ', 'move /Y ', '') " change force flag
|
||||
let cmd = vundle#installer#shellesc(cmd)
|
||||
end
|
||||
|
238
doc/vundle.txt
238
doc/vundle.txt
@ -4,17 +4,18 @@
|
||||
|
||||
1. About Vundle |vundle-about|
|
||||
2. Quick Start |vundle-quickstart|
|
||||
3. Scripts |vundle-scripts|
|
||||
3.1. Configuring Scripts |vundle-scripts-configure|
|
||||
3.2. Supported URIs |vundle-uris|
|
||||
3.3. Installing Scripts |vundle-scripts-install|
|
||||
3.4. Updating Scripts |vundle-scripts-update|
|
||||
3.5. Searching Scripts |vundle-scripts-search|
|
||||
3.6. Listing Bundles |vundle-scripts-list|
|
||||
3.7. Cleaning Up |vundle-scripts-cleanup|
|
||||
3. Plugins |vundle-plugins|
|
||||
3.1. Configuring Plugins |vundle-plugins-configure|
|
||||
3.2. Supported URIs |vundle-plugins-uris|
|
||||
3.3. Installing Plugins |vundle-plugins-install|
|
||||
3.4. Updating Plugins |vundle-plugins-update|
|
||||
3.5. Searching Plugins |vundle-plugins-search|
|
||||
3.6. Listing Plugins |vundle-plugins-list|
|
||||
3.7. Cleaning Up |vundle-plugins-cleanup|
|
||||
4. Interactive Mode |vundle-interactive|
|
||||
5. Key Mappings |vundle-keymappings|
|
||||
6. Options |vundle-options|
|
||||
7. Plugin Interface Change |vundle-interface-change|
|
||||
|
||||
=============================================================================
|
||||
1. ABOUT VUNDLE ~
|
||||
@ -39,6 +40,9 @@ Vundle automatically...
|
||||
Vundle's search uses http://vim-scripts.org to provide a list of all
|
||||
available Vim scripts.
|
||||
|
||||
Vundle is undergoing an interface change, see |vundle-interface-change| for
|
||||
more information.
|
||||
|
||||
=============================================================================
|
||||
2. QUICK START ~
|
||||
*vundle-quickstart*
|
||||
@ -76,24 +80,24 @@ available Vim scripts.
|
||||
"call vundle#rc(path)
|
||||
|
||||
" let Vundle manage Vundle, required
|
||||
Bundle 'gmarik/vundle'
|
||||
Plugin 'gmarik/vundle'
|
||||
|
||||
" The following are examples of different formats supported.
|
||||
" Keep bundle commands between here and filetype plugin indent on.
|
||||
" scripts on GitHub repos
|
||||
Bundle 'tpope/vim-fugitive'
|
||||
Bundle 'Lokaltog/vim-easymotion'
|
||||
Bundle 'tpope/vim-rails.git'
|
||||
" plugins on GitHub repos
|
||||
Plugin 'tpope/vim-fugitive'
|
||||
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.
|
||||
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
|
||||
" scripts from http://vim-scripts.org/vim/scripts.html
|
||||
Bundle 'L9'
|
||||
Bundle 'FuzzyFinder'
|
||||
" scripts not on GitHub
|
||||
Bundle 'git://git.wincent.com/command-t.git'
|
||||
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
|
||||
" plugins from http://vim-scripts.org/vim/scripts.html
|
||||
Plugin 'L9'
|
||||
Plugin 'FuzzyFinder'
|
||||
" plugins not on GitHub
|
||||
Plugin 'git://git.wincent.com/command-t.git'
|
||||
" git repos on your local machine (i.e. when working on your own plugin)
|
||||
Bundle 'file:///home/gmarik/path/to/plugin'
|
||||
Plugin 'file:///home/gmarik/path/to/plugin'
|
||||
" ...
|
||||
|
||||
filetype plugin indent on " required
|
||||
@ -105,42 +109,65 @@ available Vim scripts.
|
||||
|
||||
Launch vim and run
|
||||
>
|
||||
:BundleInstall
|
||||
:PluginInstall
|
||||
<
|
||||
To install from command line:
|
||||
>
|
||||
vim +BundleInstall +qall
|
||||
vim +PluginInstall +qall
|
||||
|
||||
=============================================================================
|
||||
3. SCRIPTS ~
|
||||
*vundle-scripts*
|
||||
3. PLUGINS ~
|
||||
*vundle-plugins*
|
||||
|
||||
3.1 CONFIGURING SCRIPTS ~
|
||||
*vundle-scripts-configure* *:Bundle*
|
||||
3.1 CONFIGURING PLUGINS ~
|
||||
*vundle-plugins-configure* *:Plugin*
|
||||
|
||||
Vundle tracks what scripts you want configured by the `Bundle` commands in your
|
||||
`.vimrc`. Each `Bundle` command tells Vundle to activate the script on startup
|
||||
adding it to your runtimepath. Commenting out or removing the line will
|
||||
disable the `Bundle`.
|
||||
Vundle tracks what plugins you want configured by the `Plugin` commands in your
|
||||
`.vimrc`. Each `Plugin` command tells Vundle to activate the script on startup
|
||||
adding it to your |runtimepath|. Commenting out or removing the line will
|
||||
disable the `Plugin`.
|
||||
|
||||
Each `Bundle` command takes a URI pointing to the script. No comments should
|
||||
Each `Plugin` command takes a URI pointing to the script. No comments should
|
||||
follow on the same line as the command. Example:
|
||||
>
|
||||
Bundle 'git_URI'
|
||||
Plugin 'git_URI'
|
||||
|
||||
There can also be a second argument after URI. It has to be a dictionary with
|
||||
a key called 'rtp'. The value for that key is a directory inside the
|
||||
repository (relative path from the root of the repository) where the vim
|
||||
plugin resides. For example:
|
||||
The `Bundle` command can optionally take a second argument after the URI. It
|
||||
has to be a dictionary, separated from the URI by a comma. Each key-value pair
|
||||
in the dictionary is a configuration option.
|
||||
|
||||
The following per-script configuration options are available.
|
||||
|
||||
The 'rtp' option
|
||||
----------------
|
||||
|
||||
Specifies a directory inside the repository (relative path from the root of
|
||||
the repository) where the vim plugin resides. It determines the path that will
|
||||
be added to the |runtimepath|.
|
||||
|
||||
For example:
|
||||
>
|
||||
Bundle 'git_URI', {'rtp': 'some/subdir/'}
|
||||
Plugin 'git_URI', {'rtp': 'some/subdir/'}
|
||||
|
||||
This can be used with git repositories that put the vim plugin inside a
|
||||
subdirectory.
|
||||
|
||||
The 'name' option
|
||||
-----------------
|
||||
|
||||
The name of the directory that will hold the local clone of the configured
|
||||
script.
|
||||
|
||||
For example:
|
||||
>
|
||||
Plugin 'git_URI', {'name': 'newPluginName'}
|
||||
|
||||
This can be used to prevent name collisions between plugins that Vundle would
|
||||
otherwise try to clone into the same directory. It also provides an additional
|
||||
level of customisation.
|
||||
|
||||
3.2 SUPPORTED URIS ~
|
||||
*vundle-uris*
|
||||
*vundle-plugins-uris*
|
||||
|
||||
`Vundle` integrates very well with both GitHub and vim-scripts.org
|
||||
(http://vim-scripts.org/vim/scripts.html) allowing short URIs. It also allows
|
||||
@ -152,22 +179,22 @@ http://git-scm.com/book/ch4-1.html
|
||||
|
||||
GitHub
|
||||
------
|
||||
GitHub is used when a user/repo is passed to `Bundle`.
|
||||
GitHub is used when a user/repo is passed to `Plugin`.
|
||||
>
|
||||
Bundle 'gmarik/Vundle.vim' => https://github.com/gmarik/Vundle.vim
|
||||
Plugin 'gmarik/Vundle.vim' => https://github.com/gmarik/Vundle.vim
|
||||
|
||||
Vim Scripts
|
||||
-----------
|
||||
Any single word without a '/' is assumed to be from Vim Scripts.
|
||||
>
|
||||
Bundle 'ctrlp.vim' => https://github.com/vim-scripts/ctrlp.vim
|
||||
Plugin 'ctrlp.vim' => https://github.com/vim-scripts/ctrlp.vim
|
||||
|
||||
Other Git URIs
|
||||
--------------
|
||||
No modification is performed on valid URIs that point outside the above
|
||||
URLs.
|
||||
>
|
||||
Bundle 'git://git.wincent.com/command-t.git'
|
||||
Plugin 'git://git.wincent.com/command-t.git'
|
||||
|
||||
Local Plugins
|
||||
-------------
|
||||
@ -175,89 +202,89 @@ The git protocol supports local installation using the 'file://' protocol.
|
||||
This is handy when developing plugins locally. Follow the protocol with an
|
||||
absolute path to the script directory.
|
||||
>
|
||||
Bundle 'file///path/from/root/to/plugin'
|
||||
Plugin 'file///path/from/root/to/plugin'
|
||||
|
||||
3.3 INSTALLING SCRIPTS ~
|
||||
*vundle-scripts-install* *:BundleInstall*
|
||||
3.3 INSTALLING PLUGINS ~
|
||||
*vundle-plugins-install* *:PluginInstall*
|
||||
>
|
||||
:BundleInstall
|
||||
:PluginInstall
|
||||
|
||||
Will install all plugins configured in your `.vimrc`. Newly installed
|
||||
scripts will be automatically enabled. Some scripts may require extra steps
|
||||
plugins will be automatically enabled. Some plugins may require extra steps
|
||||
such as compilation or external programs, refer to their documentation.
|
||||
|
||||
BundleInstall allows installation of scripts by name:
|
||||
PluginInstall allows installation of plugins by name:
|
||||
>
|
||||
:BundleInstall unite.vim
|
||||
:PluginInstall unite.vim
|
||||
|
||||
Installs and activates unite.vim. You can use Tab to auto-complete known
|
||||
script names. Note that the installation just described isn't permanent. To
|
||||
finish, you must put `Bundle 'unite.vim'` at the appropriate place in your
|
||||
finish, you must put `Plugin 'unite.vim'` at the appropriate place in your
|
||||
`.vimrc` to tell Vundle to load the plugin at startup.
|
||||
|
||||
After installing scripts press 'l' (lowercase 'L') to see the log of commands
|
||||
After installing plugins press 'l' (lowercase 'L') to see the log of commands
|
||||
if any errors occurred.
|
||||
|
||||
3.4 UPDATING SCRIPTS ~
|
||||
*vundle-scripts-update* *:BundleUpdate* *:BundleInstall!*
|
||||
3.4 UPDATING PLUGINS ~
|
||||
*vundle-plugins-update* *:PluginUpdate* *:PluginInstall!*
|
||||
>
|
||||
:BundleInstall! " NOTE: bang(!)
|
||||
:PluginInstall! " NOTE: bang(!)
|
||||
or >
|
||||
:BundleUpdate
|
||||
:PluginUpdate
|
||||
|
||||
Installs or updates the configured scripts. Press 'u' after updates complete
|
||||
Installs or updates the configured plugins. Press 'u' after updates complete
|
||||
to see the change log of all updated bundles. Press 'l' (lowercase 'L') to
|
||||
see the log of commands if any errors occurred.
|
||||
|
||||
3.5 SEARCHING SCRIPTS ~
|
||||
*vundle-scripts-search* *:BundleSearch*
|
||||
3.5 SEARCHING PLUGINS ~
|
||||
*vundle-plugins-search* *:PluginSearch*
|
||||
>
|
||||
:BundleSearch
|
||||
:PluginSearch
|
||||
|
||||
Search requires that `curl` be available on the system. The command searches
|
||||
Vim Scripts (http://vim-scripts.org/vim/scripts.html) for matching
|
||||
plugins. Results display in a new split window. For example:
|
||||
>
|
||||
BundleSearch foo
|
||||
PluginSearch foo
|
||||
|
||||
displays:
|
||||
>
|
||||
"Search results for: foo
|
||||
Bundle 'MarkdownFootnotes'
|
||||
Bundle 'VimFootnotes'
|
||||
Bundle 'foo.vim'
|
||||
Plugin 'MarkdownFootnotes'
|
||||
Plugin 'VimFootnotes'
|
||||
Plugin 'foo.vim'
|
||||
<
|
||||
*:BundleSearch!*
|
||||
*:PluginSearch!*
|
||||
Alternatively, you can refresh the script list before searching by adding a
|
||||
bang to the command.
|
||||
>
|
||||
:BundleSearch! foo
|
||||
:PluginSearch! foo
|
||||
|
||||
If the command is run without argument:
|
||||
>
|
||||
:BundleSearch!
|
||||
:PluginSearch!
|
||||
|
||||
it will display all known scripts in the new split.
|
||||
it will display all known plugins in the new split.
|
||||
|
||||
3.6 LISTING BUNDLES ~
|
||||
*vundle-scripts-list* *:BundleList*
|
||||
*vundle-plugins-list* *:PluginList*
|
||||
>
|
||||
:BundleList
|
||||
:PluginList
|
||||
|
||||
Displays a list of installed bundles.
|
||||
|
||||
3.7 CLEANING UP ~
|
||||
*vundle-scripts-cleanup* *:BundleClean*
|
||||
*vundle-plugins-cleanup* *:PluginClean*
|
||||
>
|
||||
:BundleClean
|
||||
:PluginClean
|
||||
|
||||
Requests confirmation for the removal of all scripts no longered configured
|
||||
Requests confirmation for the removal of all plugins no longered configured
|
||||
in your `.vimrc` but present in your bundle installation directory
|
||||
(default: `.vim/bundle/`).
|
||||
|
||||
*:BundleClean!*
|
||||
*:PluginClean!*
|
||||
>
|
||||
:BundleClean!
|
||||
:PluginClean!
|
||||
|
||||
Automatically confirm removal of unused bundles.
|
||||
|
||||
@ -265,25 +292,25 @@ Automatically confirm removal of unused bundles.
|
||||
4. INTERACTIVE MODE ~
|
||||
*vundle-interactive*
|
||||
|
||||
Vundle provides a simple interactive mode to help you explore new scripts
|
||||
easily. Interactive mode is available after any command that lists `Bundles`
|
||||
such as BundleSearch, BundleList or Bundles. For instance:
|
||||
Vundle provides a simple interactive mode to help you explore new plugins
|
||||
easily. Interactive mode is available after any command that lists `Plugins`
|
||||
such as PluginSearch, PluginList or Plugins. For instance:
|
||||
>
|
||||
:BundleSearch! unite
|
||||
:PluginSearch! unite
|
||||
|
||||
Searches for scripts matching 'unite' and yields a split window with:
|
||||
Searches for plugins matching 'unite' and yields a split window with:
|
||||
>
|
||||
"Keymap: i - Install bundle; c - Cleanup; s - Search; R - Reload list
|
||||
"Search results for: unite
|
||||
Bundle 'unite-scriptenames'
|
||||
Bundle 'unite.vim'
|
||||
Bundle 'unite-yarm'
|
||||
Bundle 'unite-gem'
|
||||
Bundle 'unite-locate'
|
||||
Bundle 'unite-font'
|
||||
Bundle 'unite-colorscheme'
|
||||
Plugin 'unite-scriptenames'
|
||||
Plugin 'unite.vim'
|
||||
Plugin 'unite-yarm'
|
||||
Plugin 'unite-gem'
|
||||
Plugin 'unite-locate'
|
||||
Plugin 'unite-font'
|
||||
Plugin 'unite-colorscheme'
|
||||
|
||||
To install a bundle, move your cursor to the Bundle of interest and then
|
||||
To install a bundle, move your cursor to the Plugin of interest and then
|
||||
select a command. To install 'unite.vim' put your cursor on the line and
|
||||
then push `i`. For a more complete list see |vundle-keymappings|. After
|
||||
unite.vim is installed the `:Unite file` command should be available.
|
||||
@ -296,11 +323,11 @@ Note: Interactive installation doesn't update your `.vimrc`.
|
||||
|
||||
KEY | DESCRIPTION
|
||||
----|-------------------------- >
|
||||
i | run :BundleInstall with name taken from line cursor is positioned on
|
||||
I | same as i, but runs :BundleInstall! to update bundle
|
||||
i | run :PluginInstall with name taken from line cursor is positioned on
|
||||
I | same as i, but runs :PluginInstall! to update bundle
|
||||
D | delete selected bundle (be careful not to remove local modifications)
|
||||
c | run :BundleClean
|
||||
s | run :BundleSearch
|
||||
c | run :PluginClean
|
||||
s | run :PluginSearch
|
||||
R | fetch fresh script list from server
|
||||
|
||||
=============================================================================
|
||||
@ -312,6 +339,33 @@ KEY | DESCRIPTION
|
||||
This option makes Vundle use `git` instead of `https` when building
|
||||
absolute URIs. For example:
|
||||
>
|
||||
Bundle 'sjl/gundo.vim' -> git@github.com:sjl/gundo.git
|
||||
Plugin 'sjl/gundo.vim' -> git@github.com:sjl/gundo.git
|
||||
|
||||
=============================================================================
|
||||
7. VUNDLE INTERFACE CHANGE ~
|
||||
*vundle-interface-change* *:Bundle* *:BundleInstall!*
|
||||
*:BundleUpdate* *:BundleSearch* *:BundleList* *:BundleClean!*
|
||||
*:VundleInstall!* *:VundleUpdate* *:VundleSearch*
|
||||
*:VundleList* *:VundleClean!*
|
||||
|
||||
In order to bring in new changes, Vundle is adopting a new interface.
|
||||
Going forward we will support primarily the Plugin namespace, additionally
|
||||
for convenience we will also alias some commands to the Vundle namespace.
|
||||
The following table summarizes the interface changes.
|
||||
|
||||
Deprecated Names | New Names
|
||||
-----------------------------
|
||||
Bundle | Plugin
|
||||
BundleInstall(!) | PluginInstall(!), VundleInstall(!)
|
||||
BundleUpdate | PluginUpdate, VundleUpdate
|
||||
BundleSearch(!) | PluginSearch(!), VundleSearch(!)
|
||||
BundleClean | PluginClean(!), VundleClean(!)
|
||||
BundleList | PluginList
|
||||
Bundles | Plugins
|
||||
|
||||
Note: The Bundle commands will be deprecated. You may continue using them,
|
||||
but they may not get all future updates. For instance, we have enabled
|
||||
comments on Plugin lines but not Bundle, since it requires a change in
|
||||
command declaration.
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
@ -22,8 +22,8 @@ exec 'set rtp^='.bundle_dir.'vundle/'
|
||||
|
||||
call vundle#rc(bundle_dir)
|
||||
|
||||
" vim-scripts name
|
||||
Bundle 'molokai'
|
||||
|
||||
Plugin 'molokai' " vim-scripts name
|
||||
|
||||
" github username with dashes
|
||||
Bundle 'vim-scripts/ragtag.vim'
|
||||
@ -50,6 +50,7 @@ Bundle '~/Dropbox/.gitrepos/utilz.vim.git'
|
||||
|
||||
" with options
|
||||
Bundle 'rstacruz/sparkup.git', {'rtp': 'vim/'}
|
||||
Bundle 'matchit.zip', {'name': 'matchit'}
|
||||
|
||||
" Camel case
|
||||
Bundle 'vim-scripts/RubySinatra'
|
||||
|
Loading…
Reference in New Issue
Block a user