AutoYADM commit: 2025-06-23 15:30:15

This commit is contained in:
Daniel Fichtinger 2025-06-23 15:30:15 -04:00
parent 063df18804
commit 64f5478f13

View file

@ -1,6 +1,21 @@
provide-module expand %— provide-module expand %—
define-command expand %{ define-command expand-impl %{
execute-keys '<a-:>L<a-;>H' evaluate-commands -itersel %sh{
sel="$kak_selection_desc"
left=${sel%%,*}
right=${sel##*,}
left_d=${left#*.}
right_d=${right#*.}
if [ "$left_d" -gt "$right_d" ]; then
# sel facing back
echo 'execute-keys H<a-;>L<a-;>'
elif [ "$left_d" -lt "$right_d" ]; then
# sel facing forward
echo 'execute-keys L<a-;>H<a-;>'
else
echo 'nop' #single cursor do nothing
fi
}
} }
define-command shrink %{ define-command shrink %{
execute-keys '<a-:>H<a-;>L' execute-keys '<a-:>H<a-;>L'