Copyq: Preserve order of copied items on copy or pasting multiple items

Created on 11 Feb 2014  路  10Comments  路  Source: hluk/CopyQ

  1. Copy a then b and then c to clipboard
  2. Open main window, select the three items c, b, and a and copy or paste
  3. The content is now (3 lines) with cba and not abc

Most helpful comment

Oh, now I understand.

You can copy items in reverse order by either:

  1. reverse order of selected items with Ctrl+Shift+R and copy them or
  2. select items in reverse order (from a to c) and copy.

I would probably find it confusing if items copied from the list are not in the order I've selected them.

All 10 comments

That's just because the history contains items in order from most recently copied.

Do you need to see all items in history from oldest to newest (most recently copied)?

If you only need to see this for few recently copied item, there would need to be a timeout before which all items are inserted in history in order (but how long should the timeout be?).
Example:

  1. insertIndex = 0, timer is stopped
  2. copy a, add item to insertIndex, start timer, ++insertIndex
  3. copy b, add item to insertIndex, restart timer, ++insertIndex
  4. copy c, add item to insertIndex, restart timer, ++insertIndex
  5. timer timeouts and sets insertIndex = 0

It is totally ok that the recently copied item is on top of the history in the main window.
I only want the reversed order of the selected items on copying or pasting from the main window.

Oh, now I understand.

You can copy items in reverse order by either:

  1. reverse order of selected items with Ctrl+Shift+R and copy them or
  2. select items in reverse order (from a to c) and copy.

I would probably find it confusing if items copied from the list are not in the order I've selected them.

  1. select items in reverse order (from a to c) and copy.

Awesome! Thx. I thought that I've tried the reverse selection but obviously I didn't.

  1. select items in reverse order (from a to c) and copy.

This does not work with the command Paste as Plain Text. Currently to reverse the order together with this command only Reverse Selected Items (CTRL+SHIFT+R)works

Perhaps removing this line would help.

Indeed commenting out this line looks good.

Btw. is it intended, that pasting multiple items with Return will paste all the selected items as plain text? So there is no difference between pasting multiple items with Return and with the command Paste as Plain Text (Shift+Return)?

Return key copies the whole item (with all formats) to the clipboard and -- if the "Paste to current window" option is enabled -- it sends Shift+Insert to previous window. So the target application decides what format to paste on Shift+Insert.

If you select more items and press Return, just the concatenated text of selected items is put into clipboard. Thought it could do more in future, like join HTML, images or other formats.

You can remove the aforementioned line and push the code to master branch if that works for you. It's better if the behavior is consistent.

Hi. Can you provide comand to reverse all data in clipboard? Like this one: https://github.com/hluk/CopyQ/issues/1031#issuecomment-434036500

it would be realy helpfull

Was this page helpful?
0 / 5 - 0 ratings