我想为插件的函数编写一个包装器,但它使用可变参数(...
)。如何将我的函数接收到的相同参数传递给插件的函数?
例子:
function! PluginInterface(...)
for i in a:000
echo i
endfor
endfunction
function! MyInterface(...)
echo a:1 . ' is great'
call PluginInterface(a:000)
endfunction
echo '>> Their call'
call PluginInterface('hello', 'world')
echo '>> My call'
call MyInterface('hello', 'world')