AutoYADM commit: 2025-06-09 14:13:22
This commit is contained in:
parent
13998f3066
commit
654ea26909
1 changed files with 2 additions and 4 deletions
|
@ -22,13 +22,12 @@ define-command -docstring %{
|
||||||
set-option local clip_selcount %val{selection_count}
|
set-option local clip_selcount %val{selection_count}
|
||||||
# copy selections
|
# copy selections
|
||||||
execute-keys '"ay'
|
execute-keys '"ay'
|
||||||
# disposable buffer
|
|
||||||
edit -scratch
|
|
||||||
# set shell register to copy command
|
# set shell register to copy command
|
||||||
set-register | %opt{clipboard_copy_cmd}
|
set-register | %opt{clipboard_copy_cmd}
|
||||||
# branch based on switch
|
# branch based on switch
|
||||||
execute-keys %sh{
|
execute-keys %sh{
|
||||||
if [ "$kak_opt_clip_selcount" -gt 1 ]; then
|
if [ "$kak_opt_clip_selcount" -gt 1 ]; then
|
||||||
|
echo ': edit -scratch<ret>'
|
||||||
if [ ${#} = 1 ] && [ ${1} = '-split' ]; then
|
if [ ${#} = 1 ] && [ ${1} = '-split' ]; then
|
||||||
# paste all
|
# paste all
|
||||||
# reduce selections to those without newline
|
# reduce selections to those without newline
|
||||||
|
@ -42,12 +41,11 @@ define-command -docstring %{
|
||||||
# paste all, select all, pipe to copy cmd
|
# paste all, select all, pipe to copy cmd
|
||||||
echo '"a<a-P>%<a-|><ret>'
|
echo '"a<a-P>%<a-|><ret>'
|
||||||
fi
|
fi
|
||||||
|
echo ": delete-buffer<ret>"
|
||||||
else
|
else
|
||||||
echo '<a-|><ret>'
|
echo '<a-|><ret>'
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
# clean up
|
|
||||||
# delete-buffer
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue