RsvimRt
The Rsvim.rt
global object for javascript runtime (editor process).
Example
// Create a alias to 'Rsvim.rt'.
const rt = Rsvim.rt;
Methods
exit()
exit(exitCode?): void;
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.
Parameters
Parameter | Type | Description |
---|---|---|
|
| The editor process exit with this exit code. This parameter can be omitted,
by default it uses |
Returns
void
Throws
Throws Error if exitCode
parameter is neither a integer nor undefined
.
Example
// Exit with default exit code `0`.
Rsvim.rt.exit();
// Exit with error exit code `-1`.
Rsvim.rt.exit(-1);