Fixed support for vim exit code.
Added documentation.