first commit

This commit is contained in:
Arctic 2025-07-04 11:48:40 -05:00
commit 0610f4aeab
130 changed files with 9897 additions and 0 deletions

26
fn/-z4h-move-and-kill Normal file
View file

@ -0,0 +1,26 @@
#!/usr/bin/env zsh
local -i cursor=CURSOR
"$@"
emulate -L zsh
local -i from to
if (( CURSOR < cursor )); then
from=CURSOR+1
to=cursor
else
from=cursor+1
to=CURSOR
CURSOR=$cursor
fi
if [[ $LASTWIDGET != ((z4h-|.|)(backward-|)kill-*|(.|)copy-region-as-kill) ]]; then
zle .copy-region-as-kill -- $BUFFER[from,to]
elif (( CURSOR < cursor )); then
CUTBUFFER=$BUFFER[from,to]$CUTBUFFER
else
CUTBUFFER+=$BUFFER[from,to]
fi
BUFFER[from,to]=
zle -f kill