vi-mode
v0.4.0
Published
lightweight vi-like editor component for the web
Readme
vi-mode.js: lightweight vi-like editor component for the web
Setup for local development: clone the repo and cd into it, then run:
npm ci
npx simple-git-hooks
# dev commands
npm run dev # starts local dev server for live demo
npm run test:watch # runs unit tests in watch modeRoadmap and Changelog
Planned features for upcoming releases:
- deal with horizontal and vertical scrolling
- configuration options (like colors and tab size)
- change commands in normal mode
c[motion],cc - word based motions
w,b,e
v0.4.0: visual mode
- [x] visual mode via
vandVwith all supported motions we have so far - [x] a single internal register for yanked and deleted text
- [x] delete commands in normal mode
d[motion]copy to that register - [x] yank and paste commands in normal (
yy,y[motion],p,P) and visual mode (y)
v0.3.0: architecture overhaul
- [x] separate motions and edit actions from keymap and buffer
- [x] undo/redo stack via
[n]uand[n]Ctrl+r - [x] composed actions
dd,d[motion],[n]hjkl
v0.2.1: tiny fixes
- [x] fix behavior of
xat end of line - [x] apply thorough linting
v0.2.0: a few more commands
- [x] normal mode motions:
0,$ - [x] delete commands in normal mode:
x,D - [x] more ways to enter insert mode:
a,A,o,O
v0.1.0: first mvp
- [x] basic text editor component with mode-aware cursor
- [x] normal mode:
hjklmotions,ito insert - [x] insert mode: normal text input,
BackspaceandDeleteworking,Escto normal - [x] CI: unit tests, coverage report and live demo on GitHub Pages
