Skip to main content

RSVIM v0.1.2 Just Released!

· 4 min read
Lin Rongbin
Fullstack Developer

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:

  1. Three basic editing modes: normal, insert and command-line.
  2. Scripted user configuration: user can customize their configurations through JavaScript and TypeScript. About 10 basic options are provided.
  3. Text editing: creat and open text file, preview in normal mode, insert text in insert mode, control the editor in command-line mode.
  4. 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:

  1. 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.
  2. 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.
  3. 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:

  1. Ex commands.
  2. Other editing modes: visual, operator-pending, terminal, etc.
  3. More UI widgets: statusline, line number, bars, etc.
  4. Syntax highlighting and colorscheme/theme.
  5. Modular configuration support: multi-file structure and plugins.

Don't hesitate to submit your feedback and ideas in GitHub issues and RFC!