AutoYADM commit: 2025-06-08 21:49:00
This commit is contained in:
parent
4b980f2e95
commit
ad5ca55b5a
1 changed files with 11 additions and 6 deletions
|
@ -1,24 +1,29 @@
|
||||||
# Goal: better multi-selection behavior
|
# Goal: better multi-selection behavior
|
||||||
# If we copy multiple selections, it should be copied s.t. each selection is on its own line
|
# If we copy multiple selections, it should be copied s.t. each selection is on its own line
|
||||||
|
|
||||||
define-command clip-copy-split %{
|
declare-option -docstring %{
|
||||||
|
Command for copying to system clipboard
|
||||||
|
} str clipboard_copy_cmd 'wl-copy'
|
||||||
|
|
||||||
|
define-command -docstring %{
|
||||||
|
Copies selections to system clipboard, splitting each selection onto new lines.
|
||||||
|
} clip-copy-split %{
|
||||||
evaluate-commands -save-regs 'a' %{
|
evaluate-commands -save-regs 'a' %{
|
||||||
# copy all selections
|
|
||||||
execute-keys '"ay'
|
execute-keys '"ay'
|
||||||
# create a scratch buffer
|
|
||||||
edit -scratch
|
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>'
|
execute-keys '"a<a-P>a<ret><esc>gjd%<a-|>wl-copy<ret>'
|
||||||
delete-buffer
|
delete-buffer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
define-command clip-copy %{
|
define-command -docstring %{
|
||||||
|
Copies selections to system clipboard, does not split selections onto new lines.
|
||||||
|
} clip-copy-verbatim %{
|
||||||
evaluate-commands -save-regs 'a' %{
|
evaluate-commands -save-regs 'a' %{
|
||||||
execute-keys '"ay'
|
execute-keys '"ay'
|
||||||
edit -scratch
|
edit -scratch
|
||||||
execute-keys '"a<a-P>gjd%<a-|>wl-copy<ret>'
|
execute-keys '"a<a-P>gjd%<a-|>wl-copy<ret>'
|
||||||
|
delete-buffer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue