Merging in new plugin interface.
This commit is contained in:
commit
bf70a158c5
66
README.md
66
README.md
@ -6,11 +6,11 @@
|
|||||||
|
|
||||||
[Vundle] allows you to...
|
[Vundle] allows you to...
|
||||||
|
|
||||||
* keep track of and configure your scripts right in the `.vimrc`
|
* keep track of and [configure] your plugins right in the `.vimrc`
|
||||||
* [install] configured scripts (a.k.a. bundle)
|
* [install] configured plugins (a.k.a. scripts/bundle)
|
||||||
* [update] configured scripts
|
* [update] configured plugins
|
||||||
* [search] by name all available [Vim scripts]
|
* [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]
|
* run the above actions in a *single keypress* with [interactive mode]
|
||||||
|
|
||||||
[Vundle] automatically...
|
[Vundle] automatically...
|
||||||
@ -18,6 +18,8 @@
|
|||||||
* manages the [runtime path] of your installed scripts
|
* manages the [runtime path] of your installed scripts
|
||||||
* regenerates [help tags] after installing and updating
|
* 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)
|
![Vundle-installer](http://25.media.tumblr.com/tumblr_m8m96w06G81r39828o1_1280.png)
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
@ -33,9 +35,9 @@
|
|||||||
|
|
||||||
`$ git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle`
|
`$ 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
|
```vim
|
||||||
set nocompatible " be iMproved, required
|
set nocompatible " be iMproved, required
|
||||||
@ -44,29 +46,29 @@
|
|||||||
" set the runtime path to include Vundle and initialize
|
" set the runtime path to include Vundle and initialize
|
||||||
set rtp+=~/.vim/bundle/vundle/
|
set rtp+=~/.vim/bundle/vundle/
|
||||||
call vundle#rc()
|
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'
|
"let path = '~/some/path/here'
|
||||||
"call vundle#rc(path)
|
"call vundle#rc(path)
|
||||||
|
|
||||||
" let Vundle manage Vundle, required
|
" let Vundle manage Vundle, required
|
||||||
Bundle 'gmarik/vundle'
|
Plugin 'gmarik/vundle'
|
||||||
|
|
||||||
" The following are examples of different formats supported.
|
" 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
|
" scripts on GitHub repos
|
||||||
Bundle 'tpope/vim-fugitive'
|
Plugin 'tpope/vim-fugitive'
|
||||||
Bundle 'Lokaltog/vim-easymotion'
|
Plugin 'Lokaltog/vim-easymotion'
|
||||||
Bundle 'tpope/vim-rails.git'
|
Plugin 'tpope/vim-rails.git'
|
||||||
" The sparkup vim script is in a subdirectory of this repo called vim.
|
" The sparkup vim script is in a subdirectory of this repo called vim.
|
||||||
" Pass the path to set the runtimepath properly.
|
" Pass the path to set the runtimepath properly.
|
||||||
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
|
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
|
||||||
" scripts from http://vim-scripts.org/vim/scripts.html
|
" scripts from http://vim-scripts.org/vim/scripts.html
|
||||||
Bundle 'L9'
|
Plugin 'L9'
|
||||||
Bundle 'FuzzyFinder'
|
Plugin 'FuzzyFinder'
|
||||||
" scripts not on GitHub
|
" 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)
|
" 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
|
filetype plugin indent on " required
|
||||||
@ -74,21 +76,21 @@
|
|||||||
"filetype plugin on
|
"filetype plugin on
|
||||||
"
|
"
|
||||||
" Brief help
|
" Brief help
|
||||||
" :BundleList - list configured bundles
|
" :PluginList - list configured plugins
|
||||||
" :BundleInstall(!) - install (update) bundles
|
" :PluginInstall(!) - install (update) plugins
|
||||||
" :BundleSearch(!) foo - search (or refresh cache first) for foo
|
" :PluginSearch(!) foo - search (or refresh cache first) for foo
|
||||||
" :BundleClean(!) - confirm (or auto-approve) removal of unused bundles
|
" :PluginClean(!) - confirm (or auto-approve) removal of unused plugins
|
||||||
"
|
"
|
||||||
" see :h vundle for more details or wiki for FAQ
|
" 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
|
" 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
|
## Docs
|
||||||
|
|
||||||
@ -118,7 +120,7 @@ see [Vundle contributors](https://github.com/gmarik/vundle/graphs/contributors)
|
|||||||
## TODO:
|
## TODO:
|
||||||
[Vundle] is a work in progress, so any ideas and patches are appreciated.
|
[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
|
* ✓ use preview window for search results
|
||||||
* ✓ Vim documentation
|
* ✓ Vim documentation
|
||||||
* ✓ put Vundle in `bundles/` too (will fix Vundle help)
|
* ✓ 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
|
[help tags]:http://vimdoc.sourceforge.net/htmldoc/helphelp.html#:helptags
|
||||||
[runtime path]:http://vimdoc.sourceforge.net/htmldoc/options.html#%27runtimepath%27
|
[runtime path]:http://vimdoc.sourceforge.net/htmldoc/options.html#%27runtimepath%27
|
||||||
|
|
||||||
[install]:https://github.com/gmarik/vundle/blob/master/doc/vundle.txt#L179-198
|
[configure]:https://github.com/gmarik/vundle/blob/master/doc/vundle.txt#L122-L205
|
||||||
[update]:https://github.com/gmarik/vundle/blob/master/doc/vundle.txt#L200-209
|
[install]:https://github.com/gmarik/vundle/blob/master/doc/vundle.txt#L207-L226
|
||||||
[search]:https://github.com/gmarik/vundle/blob/master/doc/vundle.txt#L211-238
|
[update]:https://github.com/gmarik/vundle/blob/master/doc/vundle.txt#L228-L237
|
||||||
[clean]:https://github.com/gmarik/vundle/blob/master/doc/vundle.txt#L247-260
|
[search]:https://github.com/gmarik/vundle/blob/master/doc/vundle.txt#L239-L267
|
||||||
[interactive mode]:https://github.com/gmarik/vundle/blob/master/doc/vundle.txt#L263-303
|
[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
|
" Readme: http://github.com/gmarik/vundle/blob/master/README.md
|
||||||
" Version: 0.9
|
" 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
|
com! -nargs=+ Bundle
|
||||||
\ call vundle#config#bundle(<args>)
|
\ call vundle#config#bundle(<args>)
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ endf
|
|||||||
|
|
||||||
func! vundle#config#init_bundle(name, opts)
|
func! vundle#config#init_bundle(name, opts)
|
||||||
if a:name != substitute(a:name, '^\s*\(.\{-}\)\s*$', '\1', '')
|
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
|
endif
|
||||||
let opts = extend(s:parse_options(a:opts), s:parse_name(substitute(a:name,"['".'"]\+','','g')), 'keep')
|
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 = extend(opts, copy(s:bundle))
|
||||||
|
@ -4,7 +4,7 @@ func! vundle#installer#new(bang, ...) abort
|
|||||||
\ map(copy(a:000), 'vundle#config#bundle(v:val, {})')
|
\ map(copy(a:000), 'vundle#config#bundle(v:val, {})')
|
||||||
|
|
||||||
let names = vundle#scripts#bundle_names(map(copy(bundles), 'v:val.name_spec'))
|
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'))
|
call s:process(a:bang, (a:bang ? 'add!' : 'add'))
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ func! s:process(bang, cmd)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if 'updated' == g:vundle_last_status && empty(msg)
|
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
|
endif
|
||||||
|
|
||||||
" goto next one
|
" goto next one
|
||||||
@ -130,16 +130,16 @@ func! vundle#installer#helptags(bundles) abort
|
|||||||
let statuses = map(copy(help_dirs), 's:helptags(v:val)')
|
let statuses = map(copy(help_dirs), 's:helptags(v:val)')
|
||||||
let errors = filter(statuses, 'v:val == 0')
|
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)
|
return len(errors)
|
||||||
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'))
|
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
|
redraw
|
||||||
echo len(g:bundles).' bundles configured'
|
echo len(g:bundles).' plugins configured'
|
||||||
endf
|
endf
|
||||||
|
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ func! vundle#installer#clean(bang) abort
|
|||||||
let headers = ['" All clean!']
|
let headers = ['" All clean!']
|
||||||
let names = []
|
let names = []
|
||||||
else
|
else
|
||||||
let headers = ['" Removing bundles:']
|
let headers = ['" Removing Plugins:']
|
||||||
let names = vundle#scripts#bundle_names(map(copy(x_dirs), 'fnamemodify(v:val, ":t")'))
|
let names = vundle#scripts#bundle_names(map(copy(x_dirs), 'fnamemodify(v:val, ":t")'))
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ func! vundle#installer#delete(bang, dir_name) abort
|
|||||||
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('Plugin '.a:dir_name)
|
||||||
call s:log('$ '.cmd)
|
call s:log('$ '.cmd)
|
||||||
call s:log('> '.out)
|
call s:log('> '.out)
|
||||||
|
|
||||||
@ -236,7 +236,7 @@ func! s:sync(bang, bundle) abort
|
|||||||
|
|
||||||
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('Plugin '.a:bundle.name_spec)
|
||||||
call s:log('$ '.cmd)
|
call s:log('$ '.cmd)
|
||||||
call s:log('> '.out)
|
call s:log('> '.out)
|
||||||
|
|
||||||
|
@ -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 plugin; 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,'"').'"')
|
||||||
@ -10,11 +10,11 @@ func! vundle#scripts#all(bang, ...)
|
|||||||
endif
|
endif
|
||||||
call vundle#scripts#view('search',info, vundle#scripts#bundle_names(reverse(matches)))
|
call vundle#scripts#view('search',info, vundle#scripts#bundle_names(reverse(matches)))
|
||||||
redraw
|
redraw
|
||||||
echo len(matches).' bundles found'
|
echo len(matches).' plugins found'
|
||||||
endf
|
endf
|
||||||
|
|
||||||
func! vundle#scripts#reload() abort
|
func! vundle#scripts#reload() abort
|
||||||
silent exec ':BundleSearch! '.(exists('b:match') ? b:match : '')
|
silent exec ':PluginSearch! '.(exists('b:match') ? b:match : '')
|
||||||
redraw
|
redraw
|
||||||
endf
|
endf
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ func! s:create_changelog() abort
|
|||||||
let updates = system(cmd)
|
let updates = system(cmd)
|
||||||
|
|
||||||
call add(g:vundle_changelog, '')
|
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"
|
if bundle.uri =~ "https://github.com"
|
||||||
call add(g:vundle_changelog, 'Compare at: '.bundle.uri[0:-5].'/compare/'.initial_sha.'...'.updated_sha)
|
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
|
endf
|
||||||
|
|
||||||
func! vundle#scripts#bundle_names(names)
|
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
|
endf
|
||||||
|
|
||||||
func! vundle#scripts#view(title, headers, results)
|
func! vundle#scripts#view(title, headers, results)
|
||||||
@ -104,16 +104,17 @@ func! vundle#scripts#view(title, headers, results)
|
|||||||
|
|
||||||
setl ft=vundle
|
setl ft=vundle
|
||||||
setl syntax=vim
|
setl syntax=vim
|
||||||
|
syn keyword vimCommand Plugin
|
||||||
syn keyword vimCommand Bundle
|
syn keyword vimCommand Bundle
|
||||||
syn keyword vimCommand Helptags
|
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>])
|
\ 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>])
|
\ 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>])
|
\ 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
|
||||||
@ -127,10 +128,10 @@ 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('.'), '^Plugin ', 'Plugin! ', '')<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('.'), '^Plugin ', 'Plugin! ', '')<CR>
|
||||||
|
|
||||||
nnoremap <buffer> l :VundleLog<CR>
|
nnoremap <buffer> l :VundleLog<CR>
|
||||||
nnoremap <buffer> u :VundleChangelog<CR>
|
nnoremap <buffer> u :VundleChangelog<CR>
|
||||||
|
209
doc/vundle.txt
209
doc/vundle.txt
@ -4,17 +4,18 @@
|
|||||||
|
|
||||||
1. About Vundle |vundle-about|
|
1. About Vundle |vundle-about|
|
||||||
2. Quick Start |vundle-quickstart|
|
2. Quick Start |vundle-quickstart|
|
||||||
3. Scripts |vundle-scripts|
|
3. Plugins |vundle-plugins|
|
||||||
3.1. Configuring Scripts |vundle-scripts-configure|
|
3.1. Configuring Plugins |vundle-plugins-configure|
|
||||||
3.2. Supported URIs |vundle-uris|
|
3.2. Supported URIs |vundle-plugins-uris|
|
||||||
3.3. Installing Scripts |vundle-scripts-install|
|
3.3. Installing Plugins |vundle-plugins-install|
|
||||||
3.4. Updating Scripts |vundle-scripts-update|
|
3.4. Updating Plugins |vundle-plugins-update|
|
||||||
3.5. Searching Scripts |vundle-scripts-search|
|
3.5. Searching Plugins |vundle-plugins-search|
|
||||||
3.6. Listing Bundles |vundle-scripts-list|
|
3.6. Listing Plugins |vundle-plugins-list|
|
||||||
3.7. Cleaning Up |vundle-scripts-cleanup|
|
3.7. Cleaning Up |vundle-plugins-cleanup|
|
||||||
4. Interactive Mode |vundle-interactive|
|
4. Interactive Mode |vundle-interactive|
|
||||||
5. Key Mappings |vundle-keymappings|
|
5. Key Mappings |vundle-keymappings|
|
||||||
6. Options |vundle-options|
|
6. Options |vundle-options|
|
||||||
|
7. Plugin Interface Change |vundle-interface-change|
|
||||||
|
|
||||||
=============================================================================
|
=============================================================================
|
||||||
1. ABOUT VUNDLE ~
|
1. ABOUT VUNDLE ~
|
||||||
@ -39,6 +40,9 @@ Vundle automatically...
|
|||||||
Vundle's search uses http://vim-scripts.org to provide a list of all
|
Vundle's search uses http://vim-scripts.org to provide a list of all
|
||||||
available Vim scripts.
|
available Vim scripts.
|
||||||
|
|
||||||
|
Vundle is undergoing an interface change, see |vundle-interface-change| for
|
||||||
|
more information.
|
||||||
|
|
||||||
=============================================================================
|
=============================================================================
|
||||||
2. QUICK START ~
|
2. QUICK START ~
|
||||||
*vundle-quickstart*
|
*vundle-quickstart*
|
||||||
@ -76,24 +80,24 @@ available Vim scripts.
|
|||||||
"call vundle#rc(path)
|
"call vundle#rc(path)
|
||||||
|
|
||||||
" let Vundle manage Vundle, required
|
" let Vundle manage Vundle, required
|
||||||
Bundle 'gmarik/vundle'
|
Plugin 'gmarik/vundle'
|
||||||
|
|
||||||
" The following are examples of different formats supported.
|
" The following are examples of different formats supported.
|
||||||
" Keep bundle commands between here and filetype plugin indent on.
|
" Keep bundle commands between here and filetype plugin indent on.
|
||||||
" scripts on GitHub repos
|
" plugins on GitHub repos
|
||||||
Bundle 'tpope/vim-fugitive'
|
Plugin 'tpope/vim-fugitive'
|
||||||
Bundle 'Lokaltog/vim-easymotion'
|
Plugin 'Lokaltog/vim-easymotion'
|
||||||
Bundle 'tpope/vim-rails.git'
|
Plugin 'tpope/vim-rails.git'
|
||||||
" The sparkup vim script is in a subdirectory of this repo called vim.
|
" The sparkup vim script is in a subdirectory of this repo called vim.
|
||||||
" Pass the path to set the runtimepath properly.
|
" Pass the path to set the runtimepath properly.
|
||||||
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
|
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
|
||||||
" scripts from http://vim-scripts.org/vim/scripts.html
|
" plugins from http://vim-scripts.org/vim/scripts.html
|
||||||
Bundle 'L9'
|
Plugin 'L9'
|
||||||
Bundle 'FuzzyFinder'
|
Plugin 'FuzzyFinder'
|
||||||
" scripts not on GitHub
|
" plugins 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)
|
" 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
|
filetype plugin indent on " required
|
||||||
@ -105,28 +109,28 @@ available Vim scripts.
|
|||||||
|
|
||||||
Launch vim and run
|
Launch vim and run
|
||||||
>
|
>
|
||||||
:BundleInstall
|
:PluginInstall
|
||||||
<
|
<
|
||||||
To install from command line:
|
To install from command line:
|
||||||
>
|
>
|
||||||
vim +BundleInstall +qall
|
vim +PluginInstall +qall
|
||||||
|
|
||||||
=============================================================================
|
=============================================================================
|
||||||
3. SCRIPTS ~
|
3. PLUGINS ~
|
||||||
*vundle-scripts*
|
*vundle-plugins*
|
||||||
|
|
||||||
3.1 CONFIGURING SCRIPTS ~
|
3.1 CONFIGURING PLUGINS ~
|
||||||
*vundle-scripts-configure* *:Bundle*
|
*vundle-plugins-configure* *:Plugin*
|
||||||
|
|
||||||
Vundle tracks what scripts you want configured by the `Bundle` commands in your
|
Vundle tracks what plugins you want configured by the `Plugin` commands in your
|
||||||
`.vimrc`. Each `Bundle` command tells Vundle to activate the script on startup
|
`.vimrc`. Each `Plugin` command tells Vundle to activate the script on startup
|
||||||
adding it to your runtimepath. Commenting out or removing the line will
|
adding it to your |runtimepath|. Commenting out or removing the line will
|
||||||
disable the `Bundle`.
|
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:
|
follow on the same line as the command. Example:
|
||||||
>
|
>
|
||||||
Bundle 'git_URI'
|
Plugin 'git_URI'
|
||||||
|
|
||||||
The `Bundle` command can optionally take a second argument after the URI. It
|
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
|
has to be a dictionary, separated from the URI by a comma. Each key-value pair
|
||||||
@ -143,7 +147,7 @@ be added to the |runtimepath|.
|
|||||||
|
|
||||||
For example:
|
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
|
This can be used with git repositories that put the vim plugin inside a
|
||||||
subdirectory.
|
subdirectory.
|
||||||
@ -156,14 +160,14 @@ script.
|
|||||||
|
|
||||||
For example:
|
For example:
|
||||||
>
|
>
|
||||||
Bundle 'git_URI', {'name': 'newPluginName'}
|
Plugin 'git_URI', {'name': 'newPluginName'}
|
||||||
|
|
||||||
This can be used to prevent name collisions between plugins that Vundle would
|
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
|
otherwise try to clone into the same directory. It also provides an additional
|
||||||
level of customisation.
|
level of customisation.
|
||||||
|
|
||||||
3.2 SUPPORTED URIS ~
|
3.2 SUPPORTED URIS ~
|
||||||
*vundle-uris*
|
*vundle-plugins-uris*
|
||||||
|
|
||||||
`Vundle` integrates very well with both GitHub and vim-scripts.org
|
`Vundle` integrates very well with both GitHub and vim-scripts.org
|
||||||
(http://vim-scripts.org/vim/scripts.html) allowing short URIs. It also allows
|
(http://vim-scripts.org/vim/scripts.html) allowing short URIs. It also allows
|
||||||
@ -175,22 +179,22 @@ http://git-scm.com/book/ch4-1.html
|
|||||||
|
|
||||||
GitHub
|
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
|
Vim Scripts
|
||||||
-----------
|
-----------
|
||||||
Any single word without a '/' is assumed to be from 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
|
Other Git URIs
|
||||||
--------------
|
--------------
|
||||||
No modification is performed on valid URIs that point outside the above
|
No modification is performed on valid URIs that point outside the above
|
||||||
URLs.
|
URLs.
|
||||||
>
|
>
|
||||||
Bundle 'git://git.wincent.com/command-t.git'
|
Plugin 'git://git.wincent.com/command-t.git'
|
||||||
|
|
||||||
Local Plugins
|
Local Plugins
|
||||||
-------------
|
-------------
|
||||||
@ -198,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
|
This is handy when developing plugins locally. Follow the protocol with an
|
||||||
absolute path to the script directory.
|
absolute path to the script directory.
|
||||||
>
|
>
|
||||||
Bundle 'file///path/from/root/to/plugin'
|
Plugin 'file///path/from/root/to/plugin'
|
||||||
|
|
||||||
3.3 INSTALLING SCRIPTS ~
|
3.3 INSTALLING PLUGINS ~
|
||||||
*vundle-scripts-install* *:BundleInstall*
|
*vundle-plugins-install* *:PluginInstall*
|
||||||
>
|
>
|
||||||
:BundleInstall
|
:PluginInstall
|
||||||
|
|
||||||
Will install all plugins configured in your `.vimrc`. Newly installed
|
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.
|
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
|
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
|
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.
|
`.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.
|
if any errors occurred.
|
||||||
|
|
||||||
3.4 UPDATING SCRIPTS ~
|
3.4 UPDATING PLUGINS ~
|
||||||
*vundle-scripts-update* *:BundleUpdate* *:BundleInstall!*
|
*vundle-plugins-update* *:PluginUpdate* *:PluginInstall!*
|
||||||
>
|
>
|
||||||
:BundleInstall! " NOTE: bang(!)
|
:PluginInstall! " NOTE: bang(!)
|
||||||
or >
|
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
|
to see the change log of all updated bundles. Press 'l' (lowercase 'L') to
|
||||||
see the log of commands if any errors occurred.
|
see the log of commands if any errors occurred.
|
||||||
|
|
||||||
3.5 SEARCHING SCRIPTS ~
|
3.5 SEARCHING PLUGINS ~
|
||||||
*vundle-scripts-search* *:BundleSearch*
|
*vundle-plugins-search* *:PluginSearch*
|
||||||
>
|
>
|
||||||
:BundleSearch
|
:PluginSearch
|
||||||
|
|
||||||
Search requires that `curl` be available on the system. The command searches
|
Search requires that `curl` be available on the system. The command searches
|
||||||
Vim Scripts (http://vim-scripts.org/vim/scripts.html) for matching
|
Vim Scripts (http://vim-scripts.org/vim/scripts.html) for matching
|
||||||
plugins. Results display in a new split window. For example:
|
plugins. Results display in a new split window. For example:
|
||||||
>
|
>
|
||||||
BundleSearch foo
|
PluginSearch foo
|
||||||
|
|
||||||
displays:
|
displays:
|
||||||
>
|
>
|
||||||
"Search results for: foo
|
"Search results for: foo
|
||||||
Bundle 'MarkdownFootnotes'
|
Plugin 'MarkdownFootnotes'
|
||||||
Bundle 'VimFootnotes'
|
Plugin 'VimFootnotes'
|
||||||
Bundle 'foo.vim'
|
Plugin 'foo.vim'
|
||||||
<
|
<
|
||||||
*:BundleSearch!*
|
*:PluginSearch!*
|
||||||
Alternatively, you can refresh the script list before searching by adding a
|
Alternatively, you can refresh the script list before searching by adding a
|
||||||
bang to the command.
|
bang to the command.
|
||||||
>
|
>
|
||||||
:BundleSearch! foo
|
:PluginSearch! foo
|
||||||
|
|
||||||
If the command is run without argument:
|
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 ~
|
3.6 LISTING BUNDLES ~
|
||||||
*vundle-scripts-list* *:BundleList*
|
*vundle-plugins-list* *:PluginList*
|
||||||
>
|
>
|
||||||
:BundleList
|
:PluginList
|
||||||
|
|
||||||
Displays a list of installed bundles.
|
Displays a list of installed bundles.
|
||||||
|
|
||||||
3.7 CLEANING UP ~
|
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
|
in your `.vimrc` but present in your bundle installation directory
|
||||||
(default: `.vim/bundle/`).
|
(default: `.vim/bundle/`).
|
||||||
|
|
||||||
*:BundleClean!*
|
*:PluginClean!*
|
||||||
>
|
>
|
||||||
:BundleClean!
|
:PluginClean!
|
||||||
|
|
||||||
Automatically confirm removal of unused bundles.
|
Automatically confirm removal of unused bundles.
|
||||||
|
|
||||||
@ -288,25 +292,25 @@ Automatically confirm removal of unused bundles.
|
|||||||
4. INTERACTIVE MODE ~
|
4. INTERACTIVE MODE ~
|
||||||
*vundle-interactive*
|
*vundle-interactive*
|
||||||
|
|
||||||
Vundle provides a simple interactive mode to help you explore new scripts
|
Vundle provides a simple interactive mode to help you explore new plugins
|
||||||
easily. Interactive mode is available after any command that lists `Bundles`
|
easily. Interactive mode is available after any command that lists `Plugins`
|
||||||
such as BundleSearch, BundleList or Bundles. For instance:
|
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
|
"Keymap: i - Install bundle; c - Cleanup; s - Search; R - Reload list
|
||||||
"Search results for: unite
|
"Search results for: unite
|
||||||
Bundle 'unite-scriptenames'
|
Plugin 'unite-scriptenames'
|
||||||
Bundle 'unite.vim'
|
Plugin 'unite.vim'
|
||||||
Bundle 'unite-yarm'
|
Plugin 'unite-yarm'
|
||||||
Bundle 'unite-gem'
|
Plugin 'unite-gem'
|
||||||
Bundle 'unite-locate'
|
Plugin 'unite-locate'
|
||||||
Bundle 'unite-font'
|
Plugin 'unite-font'
|
||||||
Bundle 'unite-colorscheme'
|
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
|
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
|
then push `i`. For a more complete list see |vundle-keymappings|. After
|
||||||
unite.vim is installed the `:Unite file` command should be available.
|
unite.vim is installed the `:Unite file` command should be available.
|
||||||
@ -319,11 +323,11 @@ Note: Interactive installation doesn't update your `.vimrc`.
|
|||||||
|
|
||||||
KEY | DESCRIPTION
|
KEY | DESCRIPTION
|
||||||
----|-------------------------- >
|
----|-------------------------- >
|
||||||
i | run :BundleInstall with name taken from line cursor is positioned on
|
i | run :PluginInstall with name taken from line cursor is positioned on
|
||||||
I | same as i, but runs :BundleInstall! to update bundle
|
I | same as i, but runs :PluginInstall! to update bundle
|
||||||
D | delete selected bundle (be careful not to remove local modifications)
|
D | delete selected bundle (be careful not to remove local modifications)
|
||||||
c | run :BundleClean
|
c | run :PluginClean
|
||||||
s | run :BundleSearch
|
s | run :PluginSearch
|
||||||
R | fetch fresh script list from server
|
R | fetch fresh script list from server
|
||||||
|
|
||||||
=============================================================================
|
=============================================================================
|
||||||
@ -335,6 +339,33 @@ KEY | DESCRIPTION
|
|||||||
This option makes Vundle use `git` instead of `https` when building
|
This option makes Vundle use `git` instead of `https` when building
|
||||||
absolute URIs. For example:
|
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:
|
vim:tw=78:ts=8:ft=help:norl:
|
||||||
|
@ -22,8 +22,8 @@ exec 'set rtp^='.bundle_dir.'vundle/'
|
|||||||
|
|
||||||
call vundle#rc(bundle_dir)
|
call vundle#rc(bundle_dir)
|
||||||
|
|
||||||
" vim-scripts name
|
|
||||||
Bundle 'molokai'
|
Plugin 'molokai' " vim-scripts name
|
||||||
|
|
||||||
" github username with dashes
|
" github username with dashes
|
||||||
Bundle 'vim-scripts/ragtag.vim'
|
Bundle 'vim-scripts/ragtag.vim'
|
||||||
|
Loading…
Reference in New Issue
Block a user