Skip to main content
Version: Next

RsvimRt

The Rsvim.rt global object for javascript runtime (editor process).

Example

// Create a alias to 'Rsvim.rt'.
const rt = Rsvim.rt;

Functions

FunctionDescription

exit

Exit editor.

tip

To ensure file system data safety, editor will wait for all the ongoing file write operations to complete before actually exiting, however any new write requests will be rejected.

Throws

Throws TypeError if exitCode is neither an integer nor undefined.

Example

// Exit with default exit code `0`.
Rsvim.rt.exit();

// Exit with error exit code `-1`.
Rsvim.rt.exit(-1);