Sublime Forum

Keep multiple clipboards when switching files in Sublime

#1

I know that Sublime must unify all multiple clipboards when leaving the application to remain compatible with the standard single clipboard of OSes.
But when switching between Sublime files, the clipboards are also unified, wouldn’t it be really useful to keep the separate multiple clipboards between files?
Or is this a setting I can modify?

0 Likes

#2

I’m not familiar with multiple clipboards, or clipboard unification. Could you expand on it a little bit, including info about your current OS?

1 Like

#3

By multiple clipboards I mean when you copy multiple selections, and unifying the clipboards means that what’s copied from the multiple selections is concatenated to form a single string.
I use MacOS.

0 Likes

#4

Actually the way multi-selection works is quite simple (based on my observation):

  • If you copy a multi-selection they are concatenated using a newline as separator.

  • If you paste with multi-selection enabled it will check whether your clipboard contains the same number of newlines as you have multi-selections. If so it will be split at the newline and each chunk will be pasted at one selection. Otherwise it will paste the whole content at each selection.

Hence this breaks if you have a different number of selection or a selection contains a newline.
However you can select and copy multiple lines, create the same number of selections and it will paste each line at one selection. This works even when you copy from an other program.

4 Likes

#5

Oh you’re right the problem wasn’t copying through different files, but copying newlines.

0 Likes