9
プラグインの関数にラッパーを書きたいが、varargs(...
)を使う。私の関数が受け取るのと同じ引数をプラグインの関数に渡すにはどうすればよいですか?vimscriptのvarargsを別の関数に渡すにはどうすればよいですか?
例:
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')