How do I pass in more than two parameters to a script function in command mode in vim?

  question, vim

I defined the following functions in the script:

funciton!  Foo(a,b,...)
 dosomething  ...
 command!  call -nargs=1 Bar call Foo(<q-args>)

I don’t know how to pass parameters and how to separate multiple parameters when calling from the command line.

Not really:call Foo(a,b,...)#Called like this, but instead:Barsuch

You should use<f-args>, the specific code is as follows:

function!  Foo(...)
 " do something
 command!  -nargs=* Bar call Foo(<f-args>)

Execute the order at this time.:BarFollowed by parameters, space division is ok, because you this Foo method defines at least two parameters, the third is variable parameters, so you execute the Bar command followed by at least two parameters, otherwise you will report an error.