20090420

When using map in a vim script...

I was struggling with editing this script when calling the map function. What I was missing was that in the expression following the list (l:block in the example below), it's necessary to surround your function call in single quotes, like this:
  • call map(l:block,'Vicle_strip_birds(v:val)')
That's because even though it's a function call, it's a string as far as the map function is concerned. That's kind of weird for me.

*Shrug*

At least the script works now.

No comments: