Browse Source

Vundle messages improvements

* Lower the severity of some of the errors when they are not really
catastrophic.
* Mention Vundle in all messages
* Make some of the messages a little more specific

Closes #579
name_collision
Jacobo de Vera 11 years ago
parent
commit
8dcb614eda
3 changed files with 7 additions and 5 deletions
  1. +3
    -2
      autoload/vundle/config.vim
  2. +2
    -1
      autoload/vundle/installer.vim
  3. +2
    -2
      autoload/vundle/scripts.vim

+ 3
- 2
autoload/vundle/config.vim View File

@ -98,13 +98,14 @@ endf
funct! s:check_bundle_name(bundle)
if has_key(s:bundle_names, a:bundle.name) &&
\ s:bundle_names[a:bundle.name]['uri'] != a:bundle.uri
echoerr 'Vundle error: Name collision for Plugin ' . a:bundle.name_spec .
echomsg 'Vundle warning: Name collision for Plugin ' . a:bundle.name_spec .
\ '. Plugin ' . s:bundle_names[a:bundle.name].spec .
\ ' previously used the name "' . a:bundle.name . '"' .
\ '. Skipping Plugin ' . a:bundle.name_spec . '.'
return 0
elseif a:bundle.name !~ '\v^[A-Za-z0-9_-]%(\.?[A-Za-z0-9_-])*$'
echoerr 'Vundle error: Invalid plugin name: ' . a:bundle.name
echomsg 'Vundle warning: Invalid plugin name: ' . a:bundle.name .
\ '. Skipping Plugin ' . a:bundle.name_spec . '.'
return 0
endif
let s:bundle_names[a:bundle.name] = { 'spec' : a:bundle.name_spec,


+ 2
- 1
autoload/vundle/installer.vim View File

@ -21,7 +21,8 @@ func! vundle#installer#new(bang, ...) abort
let bundles = filter(copy(bundles), '!empty(v:val)')
if empty(bundles)
echoerr 'No bundles were selected for operation'
let operation = a:bang ? 'update' : 'installation'
echomsg 'Vundle warning: No (valid) plugins were selected for ' . operation
return
endif


+ 2
- 2
autoload/vundle/scripts.vim View File

@ -235,14 +235,14 @@ func! s:fetch_scripts(to)
let cmd = vundle#installer#shellesc(cmd)
end
else
echoerr 'Error curl or wget is not available!'
echoerr 'Vundle error: Neither curl nor wget are available!'
return 1
endif
call system(cmd)
if (0 != v:shell_error)
echoerr 'Error fetching scripts!'
echoerr 'Vundle error: Could not fetch vim-scripts list for searching'
return v:shell_error
endif
return 0


Loading…
Cancel
Save