Implement vim-style line editor using terminal FFI #52
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
seq-lisp-2-backport
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
navicore/seq-lisp#52
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Background
Seq now has terminal FFI primitives (patch-seq v1.0.5+) that enable building interactive terminal applications in pure Seq:
terminal.raw-mode( Bool -- )terminal.read-char( -- Int )terminal.read-char?( -- Int )terminal.width( -- Int )terminal.height( -- Int )terminal.flush( -- )This enables replacing the current libedit-based REPL with a vim-style editor written in pure Seq.
Goal
Implement vim-style line editing for the seq-lisp REPL, similar to vim-line in seq-repl but written entirely in Seq.
Features
Phase 1: Basic Modal Editing
i,a,A,I)h,l,0,$)x)Phase 2: Vim Motions
w,b,e)^,g_)f,F,t,T)Phase 3: Operators
d+ motion,dd)c+ motion,cc)y+ motion,yy,p,P)Phase 4: Polish
v)j/k)u) - at least single levelImplementation Notes
Architecture
ANSI Escape Codes
Key Detection
\e[A,\e[B,\e[C,\e[D)Related
Why Pure Seq
https://github.com/navicore/seq-lisp/pull/54