From b9174c366fe83b3ceaa9e0490b848ae52de1c07d Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sat, 18 Jan 2014 15:06:06 +0900 Subject: [PATCH] Display error message if plug#end is called before plug#begin --- plug.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plug.vim b/plug.vim index 7564694..8903e30 100644 --- a/plug.vim +++ b/plug.vim @@ -91,6 +91,10 @@ function! plug#begin(...) endfunction function! plug#end() + if !exists('g:plugs') + echoerr 'Call plug#begin() first' + return + endif let keys = keys(g:plugs) while !empty(keys) let keys = keys(s:extend(keys))