I've been doing some trial-and-error on how functions can be called, and it seems like the following is my understanding:
:call MyFunction():call execute('call MyFunction'), where execute essentially performs a string escape (if that's the correct term?) to pass back to the first call param.call MyFunction(). In other words, each line in a vim function/file acts like the command-line.call execute('call MyFunction')Is that a correct understanding of the various ways to call a function? Are there any other possible ways to do it?
I don't really understand what you are doing, but if you ask if there are other ways to call a function, yes, there are.
For example,
eval(...) can call another functionecho getline('.') or something like this:s/../\=getline(...)Simply put, in almost any place when a vimscript can be evaluated, a function can be called.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With