> Some built-in vim functions support optional arguments. For example,
> we can write winnr() as well as winnr('$'). Can I define my own
> functions with optional arguments? I found no hints in vim's online
> help.The relevant help is at :help a:0 (it's another of those "it's easy to find if you already know what you're looking for" sorts of help bits :) You can have up to 20 arguments by putting "..." in your function specification's parameters, and then referencing it with "a:1", "a:2", etc. Or, you can access them as a list using "a:000". The number of arguments passed is contained in "a:0". -tim --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
