Vim Script の関数への参照とか

実はそんなに知らなかったので、個人的なまとめ。
call なんてあったのか。
詳細は、:help Funcref 辺りで。

[ソース]

function! s:plus(a, b)
    return a:a + a:b
endfunction

echo s:plus(3, 1)
let Plus_func = function("s:plus")
echo Plus_func(2, 1)
echo string(Plus_func)
echo call("s:plus", [1, 2])
echo call(Plus_func, [1, 2])

[出力]

4
3
function('s:plus')
3
3