From 367fafdba03e7d2e991c754ab1a0b6dcec0a2585 Mon Sep 17 00:00:00 2001 From: Rainux Luo Date: Fri, 21 Oct 2011 20:03:11 +0800 Subject: [PATCH 1/9] Refactor vundle#config#init() logic --- autoload/vundle/config.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index e8443c1..2777128 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -6,8 +6,9 @@ func! vundle#config#bundle(arg, ...) endf func! vundle#config#init() - if !exists('g:bundles') | let g:bundles = [] | endif - call s:rtp_rm_a() + if exists('g:bundles') + call s:rtp_rm_a() + endif let g:bundles = [] endf From e0743e1e57c80ed130ea3600ed7acdb37c8e4753 Mon Sep 17 00:00:00 2001 From: Rainux Luo Date: Fri, 21 Oct 2011 21:26:19 +0800 Subject: [PATCH 2/9] Simplify logic for require newly installed bundles --- autoload/vundle/config.vim | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index 2777128..86f707b 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -15,12 +15,10 @@ endf func! vundle#config#require(bundles) abort for b in a:bundles call s:rtp_add(b.rtpath()) - call s:rtp_add(g:bundle_dir) - " TODO: it has to be relative rtpath, not bundle.name - exec 'runtime! '.b.name.'/plugin/*.vim' - exec 'runtime! '.b.name.'/after/*.vim' - call s:rtp_rm(g:bundle_dir) endfor + " It's OK to do this since every plugin prevent itself be loaded twice + runtime! plugin/*.vim + runtime! after/*.vim endf func! vundle#config#init_bundle(name, opts) From 9bf2985b7b2a2380edfa2ca1002bc2f7ecb3598d Mon Sep 17 00:00:00 2001 From: Rainux Luo Date: Fri, 21 Oct 2011 21:47:05 +0800 Subject: [PATCH 3/9] Memoize to speed up Bundle command --- autoload/vundle/config.vim | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index 86f707b..65db652 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -14,7 +14,7 @@ endf func! vundle#config#require(bundles) abort for b in a:bundles - call s:rtp_add(b.rtpath()) + call s:rtp_add(b) endfor " It's OK to do this since every plugin prevent itself be loaded twice runtime! plugin/*.vim @@ -23,7 +23,11 @@ endf func! vundle#config#init_bundle(name, opts) let opts = extend(s:parse_options(a:opts), s:parse_name(substitute(a:name,"['".'"]\+','','g'))) - return extend(opts, copy(s:bundle)) + let bundle = extend(opts, copy(s:bundle)) + + let bundle.escaped_rtpath = fnameescape(expand(bundle.rtpath())) + let bundle.escaped_rtpath_after = fnameescape(expand(bundle.rtpath().'/after')) + return bundle endf func! s:parse_options(opts) @@ -60,21 +64,21 @@ 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:bundles), 's:rtp_rm(v:val)') endf func! s:rtp_add_a() - call filter(reverse(copy(g:bundles)), 's:rtp_add(v:val.rtpath())') + call filter(reverse(copy(g:bundles)), 's:rtp_add(v:val)') endf -func! s:rtp_rm(dir) abort - exec 'set rtp-='.fnameescape(expand(a:dir)) - exec 'set rtp-='.fnameescape(expand(a:dir.'/after')) +func! s:rtp_rm(bundle) abort + exec 'set rtp-='.a:bundle.escaped_rtpath + exec 'set rtp-='.a:bundle.escaped_rtpath_after endf -func! s:rtp_add(dir) abort - exec 'set rtp^='.fnameescape(expand(a:dir)) - exec 'set rtp+='.fnameescape(expand(a:dir.'/after')) +func! s:rtp_add(bundle) abort + exec 'set rtp^='.a:bundle.escaped_rtpath + exec 'set rtp+='.a:bundle.escaped_rtpath_after endf func! s:expand_path(path) abort From a6396e98fe04d61e959620a39f11cd7b328a1cd5 Mon Sep 17 00:00:00 2001 From: Rainux Luo Date: Fri, 21 Oct 2011 22:34:43 +0800 Subject: [PATCH 4/9] Indent code in docs correctly --- README.md | 90 +++++++++++++++++++++++++------------------------- doc/vundle.txt | 70 +++++++++++++++++++-------------------- 2 files changed, 80 insertions(+), 80 deletions(-) diff --git a/README.md b/README.md index 9dbd744..86b252c 100644 --- a/README.md +++ b/README.md @@ -8,60 +8,60 @@ 1. Setup [Vundle]: - ``` - $ git clone http://github.com/gmarik/vundle.git ~/.vim/bundle/vundle - ``` + ``` + $ git clone http://github.com/gmarik/vundle.git ~/.vim/bundle/vundle + ``` 2. Configure bundles: - Sample `.vimrc`: - - ```vim - set nocompatible " be iMproved - filetype off " required! - - set rtp+=~/.vim/bundle/vundle/ - call vundle#rc() - - " let Vundle manage Vundle - " required! - Bundle 'gmarik/vundle' - - " My Bundles here: - " - " original repos on github - Bundle 'tpope/vim-fugitive' - Bundle 'Lokaltog/vim-easymotion' - Bundle 'rstacruz/sparkup', {'rtp': 'vim/'} - " vim-scripts repos - Bundle 'L9' - Bundle 'FuzzyFinder' - Bundle 'rails.vim' - " non github repos - Bundle 'git://git.wincent.com/command-t.git' - " ... - - 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 - " - " see :h vundle for more details or wiki for FAQ - " NOTE: comments after Bundle command are not allowed.. - - ``` + Sample `.vimrc`: + + ```vim + set nocompatible " be iMproved + filetype off " required! + + set rtp+=~/.vim/bundle/vundle/ + call vundle#rc() + + " let Vundle manage Vundle + " required! + Bundle 'gmarik/vundle' + + " My Bundles here: + " + " original repos on github + Bundle 'tpope/vim-fugitive' + Bundle 'Lokaltog/vim-easymotion' + Bundle 'rstacruz/sparkup', {'rtp': 'vim/'} + " vim-scripts repos + Bundle 'L9' + Bundle 'FuzzyFinder' + Bundle 'rails.vim' + " non github repos + Bundle 'git://git.wincent.com/command-t.git' + " ... + + 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 + " + " see :h vundle for more details or wiki for FAQ + " NOTE: comments after Bundle command are not allowed.. + + ``` 3. Install configured bundles: - Launch `vim`, run `:BundleInstall`. + Launch `vim`, run `:BundleInstall`. *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/`. - + 4. Consider donating [![](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=T44EJZX8RBUWY) @@ -74,7 +74,7 @@ [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 diff --git a/doc/vundle.txt b/doc/vundle.txt index 3b347ce..8c10e8f 100644 --- a/doc/vundle.txt +++ b/doc/vundle.txt @@ -28,7 +28,7 @@ Vundle is a short cut for Vim bundle and is the Vim plug-in manager. 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 [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 ~ @@ -51,32 +51,32 @@ in order to install/search [all available vim scripts] Sample `.vimrc`: > - set nocompatible " be iMproved - filetype off " required! - - set rtp+=~/.vim/vundle.git/ - call vundle#rc() - - " let Vundle manage Vundle - Bundle 'gmarik/vundle' - - " My Bundles here: - " - " original repos on github - Bundle 'tpope/vim-fugitive' - Bundle 'Lokaltog/vim-easymotion' - Bundle 'rstacruz/sparkup', {'rtp': 'vim/'} - " vim-scripts repos - Bundle 'L9' - Bundle 'FuzzyFinder' - Bundle 'rails.vim' - " non github repos - Bundle 'git://git.wincent.com/command-t.git' - " ... - - filetype plugin indent on " required! - " or - " filetype plugin on " to not use the indentation settings set by plugins + set nocompatible " be iMproved + filetype off " required! + + set rtp+=~/.vim/vundle.git/ + call vundle#rc() + + " let Vundle manage Vundle + Bundle 'gmarik/vundle' + + " My Bundles here: + " + " original repos on github + Bundle 'tpope/vim-fugitive' + Bundle 'Lokaltog/vim-easymotion' + Bundle 'rstacruz/sparkup', {'rtp': 'vim/'} + " vim-scripts repos + Bundle 'L9' + Bundle 'FuzzyFinder' + Bundle 'rails.vim' + " non github repos + Bundle 'git://git.wincent.com/command-t.git' + " ... + + filetype plugin indent on " required! + " or + " filetype plugin on " to not use the indentation settings set by plugins 3) Install configured bundles: @@ -84,7 +84,7 @@ in order to install/search [all available vim scripts] :BundleInstall -Installing requires [Git] and triggers [Git clone](http://gitref.org/creating/#clone) for +Installing requires [Git] and triggers [Git clone](http://gitref.org/creating/#clone) for each configured repo to `~/.vim/bundle/`. 4. SCRIPTS ~ @@ -94,7 +94,7 @@ each configured repo to `~/.vim/bundle/`. Before installing scripts they need to be configured. It's done using `Bundle` command in `.vimrc`: > - Bundle 'git_repo_uri' " 'git_repo_uri' should be a valid uri to git repository + Bundle '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| ) @@ -122,7 +122,7 @@ BundleInstall allows to install scripts by name:> :BundleInstall 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 ~ @@ -170,11 +170,11 @@ run > :BundleClean -requires confirmation before removal of unused script-dirs from your `.vim/bundle`. +requires confirmation before removal of unused script-dirs from your `.vim/bundle`. *BundleClean!* > - :BundleClean! + :BundleClean! removes unused scripts with no questions. @@ -201,8 +201,8 @@ content: > Bundle '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 bundles . Move cursor over line `Bundle '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. From 4391eb35170f9d19ba484b3b8176e4222ce819b3 Mon Sep 17 00:00:00 2001 From: Rainux Luo Date: Fri, 21 Oct 2011 23:37:38 +0800 Subject: [PATCH 5/9] Introduce BundleBind! command to speed up Vim startup The performance issue was introduced in 55a5ef04. --- autoload/vundle.vim | 3 +++ autoload/vundle/config.vim | 7 +++++-- doc/vundle.txt | 11 +++++++++++ plugin/vundle.vim | 7 +++++++ 4 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 plugin/vundle.vim diff --git a/autoload/vundle.vim b/autoload/vundle.vim index 632a5b2..54586cc 100644 --- a/autoload/vundle.vim +++ b/autoload/vundle.vim @@ -7,6 +7,9 @@ com! -nargs=+ Bundle \ call vundle#config#bundle() +com! -nargs=0 -bang BundleBind +\ call vundle#config#bind() + com! -nargs=? -bang -complete=custom,vundle#scripts#complete BundleInstall \ call vundle#installer#new('!' == '', ) diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index 65db652..0c02c1d 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -1,8 +1,11 @@ func! vundle#config#bundle(arg, ...) let bundle = vundle#config#init_bundle(a:arg, a:000) - call s:rtp_rm_a() call add(g:bundles, bundle) - call s:rtp_add_a() +endf + +func! vundle#config#bind() + call s:rtp_rm_a() + call vundle#config#require(g:bundles) endf func! vundle#config#init() diff --git a/doc/vundle.txt b/doc/vundle.txt index 8c10e8f..185eb90 100644 --- a/doc/vundle.txt +++ b/doc/vundle.txt @@ -108,6 +108,17 @@ equals full uri > NOTE: Vundle defaults to http:// protocol for the short URIs + *BundleBind!* +`Bundle` command just tell Vundle which scripts you want to use, it doesn't +tell Vim load them, i.e, it doesn't update the 'runtimepath' option of Vim. + +To tell Vim load your scripts, `BundleBind!` must be executed. But Vundle will +do it automatically, so usually you don't need to do it yourself. + +The benefit of use an extra command to update 'runtimepath' is, we can make +Vim startup much faster while keeping 'runtimepath' ordered according to the +bundles declarations. + 4.2 INSTALL SCRIPTS ~ *vundle-scripts-install* *BundleInstall* diff --git a/plugin/vundle.vim b/plugin/vundle.vim new file mode 100644 index 0000000..dc19532 --- /dev/null +++ b/plugin/vundle.vim @@ -0,0 +1,7 @@ +if exists('g:loaded_vundle') || &cp + finish +endif +let g:loaded_vundle = 1 + +" Bind and load all scripts bundles immediately. +BundleBind! From 93bf5988abcef44a7b1a2dc5e6938c2b09e21b67 Mon Sep 17 00:00:00 2001 From: Rainux Luo Date: Sat, 22 Oct 2011 00:14:10 +0800 Subject: [PATCH 6/9] Refactor to reduce g:bundles usage in internal functions --- autoload/vundle/config.vim | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index 0c02c1d..74d4363 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -4,21 +4,19 @@ func! vundle#config#bundle(arg, ...) endf func! vundle#config#bind() - call s:rtp_rm_a() + call s:rtp_rm(g:bundles) call vundle#config#require(g:bundles) endf func! vundle#config#init() if exists('g:bundles') - call s:rtp_rm_a() + call s:rtp_rm(g:bundles) endif let g:bundles = [] endf func! vundle#config#require(bundles) abort - for b in a:bundles - call s:rtp_add(b) - endfor + call s:rtp_add(a:bundles) " It's OK to do this since every plugin prevent itself be loaded twice runtime! plugin/*.vim runtime! after/*.vim @@ -74,14 +72,18 @@ func! s:rtp_add_a() call filter(reverse(copy(g:bundles)), 's:rtp_add(v:val)') endf -func! s:rtp_rm(bundle) abort - exec 'set rtp-='.a:bundle.escaped_rtpath - exec 'set rtp-='.a:bundle.escaped_rtpath_after +func! s:rtp_rm(bundles) abort + for bundle in a:bundles + exec 'set rtp-='.bundle.escaped_rtpath + exec 'set rtp-='.bundle.escaped_rtpath_after + endfor endf -func! s:rtp_add(bundle) abort - exec 'set rtp^='.a:bundle.escaped_rtpath - exec 'set rtp+='.a:bundle.escaped_rtpath_after +func! s:rtp_add(bundles) abort + for bundle in reverse(copy(a:bundles)) + exec 'set rtp^='.bundle.escaped_rtpath + exec 'set rtp+='.bundle.escaped_rtpath_after + endfor endf func! s:expand_path(path) abort From 6d3830f9e853979f2e3423886cec35feb6ff339d Mon Sep 17 00:00:00 2001 From: Rainux Luo Date: Sat, 22 Oct 2011 00:16:03 +0800 Subject: [PATCH 7/9] Remove no longer used internal functions --- autoload/vundle/config.vim | 8 -------- 1 file changed, 8 deletions(-) diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index 74d4363..4d87fd2 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -64,14 +64,6 @@ func! s:parse_name(arg) return {'name': name, 'uri': uri, 'name_spec': arg } endf -func! s:rtp_rm_a() - call filter(copy(g:bundles), 's:rtp_rm(v:val)') -endf - -func! s:rtp_add_a() - call filter(reverse(copy(g:bundles)), 's:rtp_add(v:val)') -endf - func! s:rtp_rm(bundles) abort for bundle in a:bundles exec 'set rtp-='.bundle.escaped_rtpath From abad11f4c56df5f0afe9766a20c4ae1203c9d796 Mon Sep 17 00:00:00 2001 From: Rainux Luo Date: Sat, 22 Oct 2011 02:02:20 +0800 Subject: [PATCH 8/9] Control if bind a bundle via option of Bundle command --- autoload/vundle/config.vim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index 4d87fd2..14e4915 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -5,7 +5,8 @@ endf func! vundle#config#bind() call s:rtp_rm(g:bundles) - call vundle#config#require(g:bundles) + let bind_bundles = filter(copy(g:bundles), 'v:val.bind') + call vundle#config#require(bind_bundles) endf func! vundle#config#init() @@ -24,7 +25,7 @@ endf func! vundle#config#init_bundle(name, opts) let opts = extend(s:parse_options(a:opts), s:parse_name(substitute(a:name,"['".'"]\+','','g'))) - let bundle = extend(opts, copy(s:bundle)) + let bundle = extend(copy(s:bundle), opts) let bundle.escaped_rtpath = fnameescape(expand(bundle.rtpath())) let bundle.escaped_rtpath_after = fnameescape(expand(bundle.rtpath().'/after')) @@ -82,7 +83,7 @@ func! s:expand_path(path) abort return simplify(expand(a:path)) endf -let s:bundle = {} +let s:bundle = {'bind': 1} func! s:bundle.path() return s:expand_path(g:bundle_dir.'/'.self.name) From c6faf362a3da101f513d3df7a7512e025a83f73b Mon Sep 17 00:00:00 2001 From: Rainux Luo Date: Sat, 22 Oct 2011 02:58:38 +0800 Subject: [PATCH 9/9] Manually bind and load scripts via BundleBind! with tags --- README.md | 5 +++++ autoload/vundle.vim | 4 ++-- autoload/vundle/config.vim | 31 +++++++++++++++++++++++++++---- doc/vundle.txt | 31 +++++++++++++++++++++++++++++++ 4 files changed, 65 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 86b252c..856b953 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,11 @@ Bundle 'git://git.wincent.com/command-t.git' " ... + " Slow scripts which will not be bound and loaded at Vim startup. + " When needed, you can manually bind them via `BundleBind!` command, + " run `:help Bundle-option-bind` and `:help BundleBind!` for more details. + Bundle 'c.vim', {'bind': 0, 'tags': ['c']} + filetype plugin indent on " required! " " Brief help diff --git a/autoload/vundle.vim b/autoload/vundle.vim index 54586cc..ca44829 100644 --- a/autoload/vundle.vim +++ b/autoload/vundle.vim @@ -7,8 +7,8 @@ com! -nargs=+ Bundle \ call vundle#config#bundle() -com! -nargs=0 -bang BundleBind -\ call vundle#config#bind() +com! -nargs=* -bang BundleBind +\ call vundle#config#bind() com! -nargs=? -bang -complete=custom,vundle#scripts#complete BundleInstall \ call vundle#installer#new('!' == '', ) diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index 14e4915..1831d2f 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -3,10 +3,16 @@ func! vundle#config#bundle(arg, ...) call add(g:bundles, bundle) endf -func! vundle#config#bind() - call s:rtp_rm(g:bundles) - let bind_bundles = filter(copy(g:bundles), 'v:val.bind') - call vundle#config#require(bind_bundles) +func! vundle#config#bind(...) + if a:0 == 0 + call s:rtp_rm(g:bundles) + let bind_bundles = filter(copy(g:bundles), 'v:val.bind') + call vundle#config#require(bind_bundles) + else + let matched_bundles = filter(copy(g:bundles), + \ 's:is_tags_matched(v:val, '.string(a:000).')') + call vundle#config#require(matched_bundles) + end endf func! vundle#config#init() @@ -79,6 +85,23 @@ func! s:rtp_add(bundles) abort endfor endf +func! s:is_tags_matched(bundle, tags) + if !has_key(a:bundle, 'tags') + return 0 + endif + + let is_matched = 0 + for tag in a:bundle.tags + let is_matched = index(a:tags, tag) != -1 + + if is_matched + break + endif + endfor + + return is_matched +endf + func! s:expand_path(path) abort return simplify(expand(a:path)) endf diff --git a/doc/vundle.txt b/doc/vundle.txt index 185eb90..8e2c6ee 100644 --- a/doc/vundle.txt +++ b/doc/vundle.txt @@ -74,6 +74,12 @@ in order to install/search [all available vim scripts] Bundle 'git://git.wincent.com/command-t.git' " ... + " Slow scripts which will not be bound and loaded at Vim startup. + " When needed, you can manually bind them via `BundleBind!` command, + " run `:help |Bundle-option-bind|` and `:help |BundleBind!|` for more + " details. + Bundle 'c.vim', {'bind': 0, 'tags': ['c']} + filetype plugin indent on " required! " or " filetype plugin on " to not use the indentation settings set by plugins @@ -108,6 +114,23 @@ equals full uri > NOTE: Vundle defaults to http:// protocol for the short URIs + *Bundle-option-bind* +If some of your scripts will slow down your Vim startup, and you don't really +often need them, you have an option to disable bind them at Vim startup: > + + Bundle 'c.vim', {'bind': 0} + +When you need, these scripts can be bound manually via |BundleBind!| command. + + *Bundle-option-tags* +Scripts can be grouped via tags option: > + + Bundle 'c.vim', {'tags', ['c', 'slow']} + Bundle 'bash-support.vim', {'tags', ['bash', 'slow']} + +Currently the only usage of tags is to allow you manually bind slow scripts +when needed, but group scripts by tags should be useful in the future. + *BundleBind!* `Bundle` command just tell Vundle which scripts you want to use, it doesn't tell Vim load them, i.e, it doesn't update the 'runtimepath' option of Vim. @@ -119,6 +142,14 @@ The benefit of use an extra command to update 'runtimepath' is, we can make Vim startup much faster while keeping 'runtimepath' ordered according to the bundles declarations. +You can run `BundleBind!` manually to bind and load those scripts which +haven't get bound and loaded at Vim startup: > + + :BundleBind! slow + +`BundleBind!` can accept any number of tags, just use space to separate them: +> + :BundleBind! c bash ruby javascript 4.2 INSTALL SCRIPTS ~ *vundle-scripts-install* *BundleInstall*