Extend plug#load to process a list of names instead of varargs

Allows `call plug#load(keys(g:plugs))` for manually loading all plugins
at once. Close #638.
This commit is contained in:
Junegunn Choi
2017-06-06 16:17:30 +09:00
parent 06992bcfb9
commit 802b100415
2 changed files with 9 additions and 2 deletions

View File

@@ -1141,6 +1141,12 @@ Execute (plug#load - invalid arguments):
AssertEqual 0, plug#load('xxx', 'non-existent-plugin')
AssertEqual 0, plug#load('non-existent-plugin', 'xxx')
Execute (plug#load - list argument (#638)):
redir => out
call plug#load(keys(g:plugs))
redir END
AssertEqual '', out
Execute (on: []):
call plug#begin()
Plug 'junegunn/rust.vim', { 'on': [] }