I have written a Vim plugin which shells out to run external commands. Two of the commands I run are diff and grep which can each exit with a non-z
diff
grep
true is roughly equivalent to (exit 0) (the parentheses create a subshell that exits with status 0, instead of exiting your current shell.
true
(exit 0)