Hello all, I was working on my script when I ran across this unexpected behavior with the "if" statement. The doc says:
:if {expr1} *:if* *:endif* *:en* *E171* *E579* *E580* :en[dif] Execute the commands until the next matching ":else" or ":endif" if {expr1} evaluates to non-zero. I thought that meant that if {expr1} evaluated to anything other than zero (such as a string) then the "if" statement passes, but it doesn't. It's simple enough to reproduce: if "atoehu" echom "pass" else echom "fail" endif Always echo's: "fail". Is the bug in the doc, vim, or in my head? I have version 7.2.106. Cheers, David --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---