Paste all

Hi everyone! I have two questions about copy-paste.

First: what is the difference between paste <p> and paste all <a-p>?

Second: what are the magic incantations to hook up <a-p> with the system clipboard? The wiki describes how to do so for p and P, but I don’t know what would be the equivalent for <a-p> and <a-P>.

map global normal P     '!wl-paste -n<ret>'
map global normal p '<a-!>wl-paste -n<ret>'

map global normal <a-P>   ????
map global normal <a-p>   ????

If you have three selections and press y, you put three items into the " register.

If you have three selections, three items in the " register and press p, the first item will be pasted at the first selection, the second item will be pasted at the second selection, and the third item will be pasted at the third selection.

If you have three selections, one item in the " register and press p, the one item will be pasted at all three selections.

If you have one selection, three items in the " register and press p, the first item will be pasted at the selection and the other two items will be ignored. If you press <a-p>, all three items will be pasted at the selection.

If you have three selections, three items in the " register and press <a-p>, then all three items will be pasted at each selection.

The system clipboard can generally only contain one item, not a list of items. It doesn’t make sense to wire it up to <a-p> and <a-P>, except perhaps in exactly the same way as p and P.

1 Like

Thanks! I also just noticed that my clipboard setup was using `map global normal p", which meant that pasting a multiple selection would paste a single thing from the system clipboard. Switched it to “map global user p” and now everything is working great.