-
-
Notifications
You must be signed in to change notification settings - Fork 11
Pasting multiple items
CutBox also allows you to select multiple pasteboard items and paste them all back in one go.
For example, let's say I have a bunch of web links I want to collect.
- Right click each link and copy address
- Repeat (1) until I've copied them all
- Switch to the application you want to copy all the links to
- Open CutBox switch to regexp mode with [Cmd + S] (you'll see search mode change at the bottom right)
- Search CutBox for
https?:
- Select all the links you want to paste with mouse and/or keyboard shortcuts
- Press enter to paste all the items.
All your links will be pasted with new-lines in between each one.
Mutli-item paste is configurable so you can choose a string to join between the items, and you can also wrap a pair of strings around the start and end.
For example, if I wanted to collect a list of numbers from various different place to paste into a piece of code, usually I'd need to edit them after copy pasting them one by one.
With CutBox I don't have to do that. Now I can just do this:
-
Set CutBox search mode to regexp
-
Set my join and wraping strings up in CutBox preferences
-
e.g. my target is JavaScript code, I want to use an array of decimal numbers
- Set my join string to
,
- Set wrapping on
- Set my start string to
let numberArray = [
- Set my end string to
]
- Set my start string to
- close preferences
- Set my join string to
-
Copy each item, from wherever they are until I've copied them all
-
Switch to my code editor
-
Open CutBox search and enter
^\d+\.\d+$
(i.e. match all floating point numbers) -
Select the items with the mouse / keyboard
-
Press enter to paste all the items.
-
(Assuming you copied these numbers: 93.13 44.52 52.21 32.14)
-
You'll have something like...
let numberArray = [32.14, 52.21, 44.52, 93.13]
Note: at the moment the sort order of the items will be in the reverse order you copied the items. For example, I copy 1, then 2, then 3, When I paste them back... I get 3 2 1
.
You can use wrapping and joining to do a bunch of things. I'm interested to hear what you use it for. Tweet me at @ocodo
If you'd like more features in CutBox open a new issue and mark it enhancements.
CutBox a nice little pasteboard time-machine