AutoYADM commit: 2025-06-08 21:34:00
This commit is contained in:
parent
9a0344b51b
commit
4b980f2e95
1 changed files with 22 additions and 0 deletions
|
@ -1,5 +1,27 @@
|
|||
# Goal: better multi-selection behavior
|
||||
# If we copy multiple selections, it should be copied s.t. each selection is on its own line
|
||||
|
||||
define-command clip-copy-split %{
|
||||
evaluate-commands -save-regs 'a' %{
|
||||
# copy all selections
|
||||
execute-keys '"ay'
|
||||
# create a scratch buffer
|
||||
edit -scratch
|
||||
# paste all selections, separate lines, delete last newline
|
||||
# select all, copy to clipboard
|
||||
execute-keys '"a<a-P>a<ret><esc>gjd%<a-|>wl-copy<ret>'
|
||||
delete-buffer
|
||||
}
|
||||
}
|
||||
|
||||
define-command clip-copy %{
|
||||
evaluate-commands -save-regs 'a' %{
|
||||
execute-keys '"ay'
|
||||
edit -scratch
|
||||
execute-keys '"a<a-P>gjd%<a-|>wl-copy<ret>'
|
||||
}
|
||||
}
|
||||
|
||||
map -docstring "yank the selection into the clipboard" global user y "<a-|> wl-copy<ret>"
|
||||
|
||||
map -docstring "paste the clipboard" global user p "<a-!> wl-paste -n<ret>"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue