I have hit this thrice already, while using the ?: ternary operator, in some conditions, you are forced to put whitespace to separate the operator otherwise Vim gets confused. Here is something that fails:
let direction = (a:0?a:1:1) I had this issue before calling script-local functions from the true or false condition. The workaround as I said for the above is: let direction = (a:0 ? a:1 :1) The problem is, sometimes I have a force of habit to skip the whitespace in some places when I want the code to be really compact/tight (especially when with map(), filter() or \=), and I will not notice the problem until sometime later when the code gets executed. If the code happened to execute with a :silent, you may have to do quite a bit of debugging to find this kind of errors. Is it possible for Vim to parse this unambiguously? The usage could be even worse, something like: let direction = (a:0>1?a:2:a:1) -- Thanks, Hari __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
