diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index a913451..f6c080f 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -45,10 +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*$' 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' diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index 11c668f..5a60e16 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 @@ -49,7 +49,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) diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index 85ae6f2..f994a31 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 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