This seems like it should be the easiest thing to do, but I'm having trouble calling a vim function with a variable. For example, I have the following function:
func Run1()
echom 'Running run1'
endfunc
This works fine:
:call Run1()
" Running run1
Now, to add a function parameter:
func Run2(var)
echom 'Running run2 with var ' . var
endfunc
And calling it should be as simple as:
:call Run2('hello')
# E121: Undefined variable: var
But I get an error. How should I function be called then?