RSVIM v0.1.2 Just Released!
After about one and a half years of development, RSVIM finally released its first version: v0.1.2!
Introduction
v0.1.2 is a minimal prototype with extremely limited functionality, but still includes several core components of the text editor:
- Three basic editing modes: normal, insert and command-line.
- Scripted user configuration: user can customize their configurations through JavaScript and TypeScript. About 10 basic options are provided.
- Text editing: creat and open text file, preview in normal mode, insert text in insert mode, control the editor in command-line mode.
- Runtime API: About 5 basic JavaScript APIs are provided, along with the builtin
:js
ex command to allow user to save file and quit.
Features
Here are some demos and comparison with Vim.
Demos are recorded with Mac and kitty terminal.
Preview
No-Wrap
Vim
Rsvim
Vim configs:
set nowrap
set noswapfile
set nonumber
Rsvim configs:
Rsvim.opt.wrap = false;
Wrap
Vim
Rsvim
Vim configs:
set wrap
set noswapfile
set nonumber
Rsvim configs:
Rsvim.opt.wrap = true;
Wrap with Line-Break
Vim
Rsvim
Vim configs:
set wrap
set linebreak
set noswapfile
set nonumber
Rsvim configs:
Rsvim.opt.wrap = true;
Rsvim.opt.lineBreak = true;
Editing
This screen recording will demo how to open and edit a file, save content and quit.
Vision
RSVIM has been born with the gene of excellence:
- Compared with traditional TUI application's "input" => "calculation" => "output" synchronous process, it is more like a HTTP API server that serves you. It runs naturally in an asynchronous multi-threaded runtime, which easily utilizes all CPUs and schedules all IO tasks asynchronously.
- Borrowing ideas from GUI and CSS frameworks, the UI widget tree, canvas and (TODO) layout system are built from scratch. Although it is still too simple now, it brings the potential for a truly powerful and flexible UI system.
- JavaScript/TypeScript and their community have brought broader prospects and potential to RSVIM. You can think of RSVIM as a javascript-based runtime similar to node and deno (but highly specialized for text editing). In the future, plugins will be a npm package, published and updated directly using the npm registry.
What's Next
Too many features are still waiting to be implemented and improved. Here are some of the most important next steps I can think of:
- Ex commands.
- Other editing modes: visual, operator-pending, terminal, etc.
- More UI widgets: statusline, line number, bars, etc.
- Syntax highlighting and colorscheme/theme.
- Modular configuration support: multi-file structure and plugins.
Don't hesitate to submit your feedback and ideas in GitHub issues and RFC!