From 14891dbae2152463b3801c9981a3796cae5234ba Mon Sep 17 00:00:00 2001 From: Jacobo de Vera Date: Sat, 16 Mar 2013 00:09:07 +0000 Subject: [PATCH] Check for leading/trailing spaces in bundle specs Warn the user when a leading or trailing space is found in one the bundle specs they have configured using the Bundle command. --- autoload/vundle/config.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index 55c7d7d..5bb6e3f 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -24,6 +24,9 @@ func! vundle#config#require(bundles) abort endf func! vundle#config#init_bundle(name, opts) + if a:name != substitute(a:name, '^\s*\(.\{-}\)\s*$', '\1', '') + echo "Spurious leading and/or trailing whitespace found in bundle spec '" . a:name . "'" + endif let opts = extend(s:parse_options(a:opts), s:parse_name(substitute(a:name,"['".'"]\+','','g'))) let b = extend(opts, copy(s:bundle)) let b.rtpath = s:rtpath(opts)