From 8d4c341a0a25e5eeb3f8c47493848dcff0df4bda Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sat, 13 Feb 2016 12:44:52 +0900 Subject: [PATCH] Rename script-local function to generate better error message This commit renames s:add which is called on Plug command to s:Plug. E116: Invalid arguments for function 2_Plug Related: #407 --- plug.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plug.vim b/plug.vim index 3357de5..23de2ac 100644 --- a/plug.vim +++ b/plug.vim @@ -128,7 +128,7 @@ function! plug#begin(...) endfunction function! s:define_commands() - command! -nargs=+ -bar Plug call s:add() + command! -nargs=+ -bar Plug call s:Plug() if !executable('git') return s:err('`git` executable not found. Most commands will not be available. To suppress this message, prepend `silent!` to `call plug#begin(...)`.') endif @@ -458,7 +458,7 @@ function! s:lod_map(map, names, prefix) call feedkeys(a:prefix . substitute(a:map, '^', "\", '') . extra) endfunction -function! s:add(repo, ...) +function! s:Plug(repo, ...) if a:0 > 1 return s:err('Invalid number of arguments (1..2)') endif