Consider the following script:
execute 'if 0'
echo 'Not shown'
else
echo 'Shown'
endif
. If you source it you find that instead of 3 errors (“missing :endif”, “:else
without :if”, “:endif without :if”) and two messages (“Not shown” and “Shown”)
you will see one message (“Shown”) and no errors.
Note that `execute 'if 0'` is explicitly forbidden in help:
> Note: The executed string may be any command-line, but
> you cannot start or end a "while", "for" or "if"
> command. Thus this is illegal:
> :execute 'while i > 5'
> :execute 'echo "test" | break'
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.