AutoYADM commit: 2025-06-23 15:30:15
This commit is contained in:
parent
063df18804
commit
64f5478f13
1 changed files with 17 additions and 2 deletions
|
@ -1,6 +1,21 @@
|
|||
provide-module expand %—
|
||||
define-command expand %{
|
||||
execute-keys '<a-:>L<a-;>H'
|
||||
define-command expand-impl %{
|
||||
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 %{
|
||||
execute-keys '<a-:>H<a-;>L'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue