From 352181553fa584dfa9c1c93940b57d3f7f1f5d94 Mon Sep 17 00:00:00 2001 From: gmarik Date: Sun, 20 Mar 2011 01:15:40 -0500 Subject: [PATCH 1/5] docs --- doc/vundle.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/vundle.txt b/doc/vundle.txt index be90db9..a67563e 100644 --- a/doc/vundle.txt +++ b/doc/vundle.txt @@ -84,7 +84,7 @@ command in `.vimrc`: > or > Bundle 'script_name' " 'script-name' should be an official script name (see |vundle-scripts-search| ) -Vundle loves Github, that's why short uris can be used to configure bundles: > +Vundle loves Github, that's why short uris can be used with commands: > Bundle 'tpope/vim-fugitive' @@ -92,6 +92,8 @@ equals full uri > Bundle 'http://github.com/tpope/vim-fugitive.git' +NOTE: Vundle defaults to http:// protocol for the short URIs + 4.2 INSTALL SCRIPTS ~ *vundle-scripts-install* *BundleInstall* @@ -158,11 +160,11 @@ removes unused scripts with no questions. 5. INTERACTIVE MODE ~ Vundle provides simple interactive mode to help you explore new scripts easily. -Interactive mode is available as result of :Bundles command. For instance running > +Interactive mode is available as result of :Bundles command. For instance, running: > :Bundles! unite -searches for scripts matching 'unite' string and yields a split window with +triggers search for scripts matching 'unite' and yields a split window with content: > "Keymap: i - Install bundle; c - Cleanup; r - Refine list; R - Reload list From a3c4221763fb421441d0511c52a29064fcb01c3f Mon Sep 17 00:00:00 2001 From: gmarik Date: Wed, 23 Mar 2011 12:55:45 -0500 Subject: [PATCH 2/5] Verify if bundle selected --- autoload/vundle/scripts.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index 652153e..98e68ea 100644 --- a/autoload/vundle/scripts.vim +++ b/autoload/vundle/scripts.vim @@ -25,7 +25,12 @@ func! vundle#scripts#complete(a,c,d) endf func! vundle#scripts#install() abort - let line = substitute(substitute(getline('.'), '\s*Bundle\s*','','g'), "'",'','g') + let l = getline('.') + if l !~ '^Bundle ' + echohl Error | echo 'Select Bundle to install'| echohl None + return 0 + end + let line = substitute(substitute(l, '\s*Bundle\s*','','g'), "'",'','g') call vundle#installer#install(0, line) endf From 0852047c90083692d418908b18dd89bed708550b Mon Sep 17 00:00:00 2001 From: gmarik Date: Mon, 28 Mar 2011 13:05:26 -0500 Subject: [PATCH 3/5] use empty() where possible --- autoload/vundle/installer.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index 718d07a..c553793 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -8,10 +8,10 @@ func! vundle#installer#install(bang, ...) redraw! call vundle#config#require(bundles) - call s:log("Installed bundles:\n".join((len(installed) == 0 ? ['no new bundless installed'] : map(installed, 'v:val.name')),"\n")) + call s:log("Installed bundles:\n".join((empty(installed) ? ['no new bundless installed'] : map(installed, 'v:val.name')),"\n")) let help_dirs = vundle#installer#helptags(bundles) - if len(help_dirs) > 0 + if !empty(help_dirs) call s:log('Helptags: done. '.len(help_dirs).' bundles processed') endif endf @@ -45,7 +45,7 @@ endf func! s:has_doc(rtp) return isdirectory(a:rtp.'/doc') \ && (!filereadable(a:rtp.'/doc/tags') || filewritable(a:rtp.'/doc/tags')) - \ && (len(glob(a:rtp.'/doc/*.txt')) > 0 || len(glob(a:rtp.'/doc/*.??x')) > 0) + \ && !(empty(glob(a:rtp.'/doc/*.txt')) && empty(glob(a:rtp.'/doc/*.??x'))) endf func! s:helptags(rtp) From 7e7cde6444eefc171f552166d9e2c94b1b80831e Mon Sep 17 00:00:00 2001 From: termac Date: Thu, 31 Mar 2011 21:18:13 +0200 Subject: [PATCH 4/5] fix regex for local repositories --- autoload/vundle/config.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index a913451..770ac85 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -47,6 +47,7 @@ func! s:parse_name(arg) elseif arg =~ '^\s*\(git@\|git://\)\S\+' \ || arg =~ 'https\?://' \ || arg =~ '\.git\s*$' + \ || arg =~ '\(file://\)\?[~/]' let uri = arg let name = substitute(split(uri,'\/')[-1], '\.git\s*$','','i') else From 9dcdbf16c6a0a0c9e4e85c3564d84a49824e535f Mon Sep 17 00:00:00 2001 From: gmarik Date: Sun, 3 Apr 2011 15:30:45 -0500 Subject: [PATCH 5/5] support file:// scheme and repo/.git path --- autoload/vundle/config.vim | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index 770ac85..f6c080f 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -45,11 +45,10 @@ func! s:parse_name(arg) let uri = 'https://github.com/'.split(arg, ':')[-1] let name = substitute(split(uri,'\/')[-1], '\.git\s*$','','i') elseif arg =~ '^\s*\(git@\|git://\)\S\+' - \ || arg =~ 'https\?://' + \ || arg =~ '(file|https\?)://' \ || arg =~ '\.git\s*$' - \ || arg =~ '\(file://\)\?[~/]' let uri = arg - let name = substitute(split(uri,'\/')[-1], '\.git\s*$','','i') + let name = split( substitute(uri,'/\?\.git\s*$','','i') ,'\/')[-1] else let name = arg let uri = 'https://github.com/vim-scripts/'.name.'.git'