Add minimal terminal FFI for raw input mode #274
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
refactor
rust
technical-debt
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
navicore/patch-seq#274
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?
Use Case
Enable vim-style line editing in pure Seq applications (like seq-lisp's REPL) without depending on Rust crates like vim-line.
Currently, Seq exposes
readlinevia libedit FFI, which returns complete lines after Enter is pressed. This makes it impossible to implement character-by-character input handling needed for:j,k,dd,x, etc.)Requested Primitives
A minimal terminal FFI (~4 functions) would enable implementing vim-line-style editing in pure Seq:
Optional but useful:
Why This Approach
Implementation Notes
The underlying implementation would use standard termios (Unix) or similar for raw mode. Libraries like
crosstermcould be used internally, or direct libc calls.Related
This would enable seq-lisp to have a vim-style REPL without breaking its "pure Seq" nature. Currently seq-lisp uses libedit's readline which provides emacs-style editing only.
Superseded by #276 - implementing as builtins in runtime instead of FFI, which avoids the need for users to build/distribute custom libraries.
https://github.com/navicore/patch-seq/issues/276
https://github.com/navicore/patch-seq/pull/277