この記事は Vim Advent Calendar 2013 136日目の記事になります。 本来は昨日の記事として書こうと思っていたんですが、諸事情により今日の記事に…。 そんなわけで「昨日のVAC書いてもいいよー」という人募集中です。 Advent Calendar とは一体… [関数の引数にデフォルト値を渡したい] さて、Vim script で次のように関数の引数にデフォルト値を渡したいことがあると思います。 function! s:func(command, name = command, mode = 0) " ... endfunction call s:func("ls") call s:func("ls", "command ls") call s:func("ls", "ls", 1) しかし、Vim script ではこういう書き方はできません。 [可変長引数を利用する