I have a function that looks like
fu! MultiLineTest(u, v)
if a:u != 2 &&
\ a:v != 2
return 'yes'
else
return 'no'
end
endfu
Of course, the actual function is longer and more complicated.
Now, I'd like to add comments to the multi line expression, like so:
if a:u != 2 && " Neither u nor
\ a:v != 2 " v must be 2
If the function is called now, I get an error:
E15: Invalid expression: a:u != 2 && " neither u nor a:v != 2 " v must be 2
I understand why this error is thrown. But I'd still find it nice if I could somehow add comments to such a multi line expression. Is this possible?
"
is used as both a string delimiter and a comment character, and thus its exact meaning depends on the context. Now, this wouldn't be a problem in a normal language. However, VimL is weird at best. End line comments can create problems that are really hard to debug.