Thursday, August 25, 2011

Re: preset param value in vimscript func

Hi niva!

On Do, 25 Aug 2011, niva wrote:

> I would like to know , as in C++, how can I set a value by default
> into the second arg of a vimscript func in order to call the fu with
> only one arg out of two required;
>
> fu bar(arg1, arg2=20)
> //todo
> endfu
>
> I would like the call looks like that:
>
> call bar("foo")

:h a:000

regards,
Christian
--

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: