Helix-aligned modal editor for pi's prompt input. Six modes, motion-first editing, Kakoune-inspired registers.
pi install npm:pi-modal-editor| Mode | Indicator | Enter via |
|---|---|---|
| Normal | -- |
Esc |
| Insert | [i] |
i / a |
| Selection | [v] |
v |
| Surround | [s] |
m |
| Register | ["] |
" |
| History | [h] |
Ctrl+k |
| Keys | Action |
|---|---|
i/a |
Insert before/after |
I/A |
Insert at start/end |
v |
Selection mode |
h/l |
Left/right |
w/b/e |
Word motions |
0/$ |
Line start/end |
d/D |
Delete char/to end |
y/Y |
Yank char/line |
p/P |
Paste after/before |
m |
Surround mode |
" |
Register mode |
Ctrl+k/j |
History prev/next |
u/U |
Undo/redo |
| Keys | Action |
|---|---|
h/l/w/b |
Expand |
d/y |
Delete/yank |
m |
Surround |
Esc |
Normal |
Wrap selection with `( ) [ ] { } " ' ``
Press a–z to select a named register, then y/p to yank/paste.
k/j or ↑/↓ to navigate, Enter to load, Esc to cancel.
pi-modal keeps the default pi cursor behavior unless configured otherwise.
To enable Helix-style cursor shapes (bar in Insert mode, block otherwise), create:
~/.pi/agent/pi-modal-config.json:
{
"cursorShape": true
}pi /modal-editor:mode
pi /modal-editor:content
pi /modal-editor:helpMIT