From b60ecd2cc16c8a0267751fa2123651f7ce374132 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Thu, 26 Sep 2013 06:37:17 +0900 Subject: [PATCH] Make plug#begin() return boolean value silent! if plug#begin() Plug 'user/repo' .. call plug#end() endif --- plug.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plug.vim b/plug.vim index dd3a7c5..72b0c2e 100644 --- a/plug.vim +++ b/plug.vim @@ -65,12 +65,12 @@ function! plug#begin(...) call mkdir(home, 'p') catch echoerr 'Invalid plug directory: '. home - return + return 0 endtry endif if !executable('git') echoerr "`git' executable not found. vim-plug requires git." - return + return 0 endif let g:plug_home = home @@ -82,6 +82,8 @@ function! plug#begin(...) command! -nargs=0 -bang PlugClean call s:clean('' == '!') command! -nargs=0 PlugUpgrade if s:upgrade() | execute "source ". s:me | endif command! -nargs=0 PlugStatus call s:status() + + return 1 endfunction function! plug#end()