Sublime Forum

Multi-cursor paste whole block

#1

Suppose I have

A
B
C

1
2
3

I copy the A,B,C part by creating a cursor for each line and then copying the line.
Then I create a cursor for each 1,2,3 line and hit paste. I get this

1A
2B
3C

Which is great 99% of the time I want this. But, sometimes I actually want this

1A
B
C

2A
B
C

3A
B
C

Is there a way to do this without going and copying something additional to make the counts not match?

0 Likes

#3

You simply copy

A
B
C

with a single cursor and paste them with 3 cursors.

0 Likes

#4

yeah ok what if I have this
A
B
C
D
E

And I copy A,D,E and then want to paste them like this
1A
D
E

2A
D
E

3A
D
E

The point is I quite often

  1. take several seconds picking several things I want to copy from various positions in a file. During this step I don’t know how many places I’m going to paste to.
  2. take several seconds creating a cursor where you want to paste those things in a big list
  3. hit paste. Instead of pasting the list everywhere it is “smart” and pastes 1 copied thing into each cursor.

This is cool 99% of the time. But is there a way to paste the whole list to each cursor (which is what happens if the counts don’t match)

It is a pain to have to go back to step 1 again. Feels like I should be able to just press CTRL+ALT+V or something

0 Likes

#5

I would simply say no you can’t.

0 Likes

#6

The behavior about multi-cursor copy/paste in ST is that

if “the numebr of total lines” copied doesn’t match “the number of cursors when pasting”, the “whole” content copied will be pasted to every cursor.

Note that if you copied a line with its line ending, you are copying 2 lines.

1 Like

#7

ok then the workaround is probably something like
CTRL+N
paste
CTRL+SHIFT+A
copy
paste
go back to old tab and hit paste

0 Likes