Configuration
Rsvim uses javascript/typescript to configure its behavior, the script drives everything for us.
Rsvim is build with Rust, uses Tokio as async runtime, Google's V8 engine (and rusty bindings provided by Deno team) as script interpreter.
In one way, you can think of javascript script as a configuration solution, a plugin runtime.
In another way, you can think of Rsvim as a javascript-based runtime just like Node.js and Deno, but specialized for terminal based text editing/processing, taken over the control of stdio
, i.e. stdin
is used for user keyboard/mouse events, stdout
/stderr
are used for terminal rendering. Rsvim (will) also provides ECMAScript Standard Built-in APIs and Web Platform APIs, which are widely implemented by most javascript-based runtimes: chrome/firefox browsers, node/deno runtimes, etc.
In script, javascript APIs is literally the only way to interact with Rsvim. For other things such as Vim commands and key mappings, they are just user interfaces backed with js functions.