@leohenon/pi-vim
v0.0.5
Published
Vim-mode editor extension for pi
Readme
pi-vim
Vim mode for pi.
Normal, insert, visual, and replace modes with motions, text objects, yank/put, and undo/redo.
Demo

Install
pi install npm:@leohenon/pi-vimUsage
Toggle with:
/vim-modeInsert mode
Esc/Ctrl-[→ normal modeShift+Alt+A→ line endShift+Alt+I→ line startAlt+o→ open line belowAlt+Shift+O→ open line above
Normal mode
Mode
i,a,I,Ao,Ov→ visualV→ visual lineR→ replace
Motions
h,j,k,lw,b,eW,B,E0,^,_,$gg,Gf,F,t,T;,,- counts on motions
Delete
dd,dw,de,db,dW,dE,dBd0,d^,d$,d_,dGd{count}j,d{count}kdf,dF,dt,dTdiw,daw,di",da",di',da',di`,da`,di(,da(,di[,da[,di{,da{
Change
cc,cw,ce,cb,cW,cE,cBc0,c^,c$,c_cf,cF,ct,cTciw,caw,ci",ca",ci',ca',ci`,ca`,ci(,ca(,ci[,ca[,ci{,ca{
Yank
yy,Yyw,ye,yb,yW,yE,yBy0,y^,y$,y_,yGy{count}j,y{count}kyfyiw,yaw,yi",ya",yi',ya',yi`,ya`,yi(,ya(,yi[,ya[,yi{,ya{
Edit
x,s,Sr{char}R→ replace mode~→ toggle caseD,C- counts on
x,r,~
Put
p,P- counts on
p,P - puts read from the system clipboard
Undo
u,Ctrl-_Ctrl-r- counts on undo/redo
Visual mode
Characterwise
venters visual modeEscexits to normal moded/xdelete selectionyyank selection- editor copy shortcut yanks selection
cchange selectionp,Preplace selection with system clipboard
Linewise
Venters visual line modej,kextend by full linesEscexits to normal moded/xdelete selected linesyyank selected linescchange selected linesp,Preplace selected lines from the system clipboard
[!NOTE] yanks sync the system clipboard, puts read from it, and delete/change operations do not overwrite it
Files
pi-vim/
index.ts
package.json
README.md[!NOTE] If you run into any bugs, please open an issue.
License
MIT
