Closed rottencandy closed 1 year ago
EDIT: Forget what I wrote below, @rottencandy. This bug has been fixed, so I would suggest closing this issue.
You just need to install the latest commit. Uninstall the default pip
version (pip uninstall vim-vint
) and then run pip install git+https://github.com/Vimjas/vint.git
.
I encountered the same bug. Optional function arguments have been supported since Vim 8.1.1310.
A workaround is described on Stack Overflow. Rewriting your example:
function Something(key, ...)
let l:value = get(a:, 1, 10)
echo a:key .. ": " .. l:value
endfunction
@infinitewhileloop thank you! Installing the git version does solve the issue!
Vint gives an error for optional arguments in functions. For the example from
:h optional-function-argument
:Error: