Skip to content

unitdhda/pi-modal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pi-modal-editor

Helix-aligned modal editor for pi's prompt input. Six modes, motion-first editing, Kakoune-inspired registers.

Install

pi install npm:pi-modal-editor

Modes

Mode Indicator Enter via
Normal -- Esc
Insert [i] i / a
Selection [v] v
Surround [s] m
Register ["] "
History [h] Ctrl+k

Keybindings

Normal

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

Selection (v)

Keys Action
h/l/w/b Expand
d/y Delete/yank
m Surround
Esc Normal

Surround (m)

Wrap selection with `( ) [ ] { } " ' ``

Register (")

Press a–z to select a named register, then y/p to yank/paste.

History (Ctrl+k)

k/j or ↑/↓ to navigate, Enter to load, Esc to cancel.

Configuration

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
}

Commands

pi /modal-editor:mode
pi /modal-editor:content
pi /modal-editor:help

License

MIT

About

Kakoune/Helix-like modal editor for pi prompt input - motion-first and with selection markers

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors