Sublime Forum

Create a new column or replace an existing column by pasting

#1

Hi! I am having a problem with column operation. Two scenarios:

Scenario 1: I copy and paste a column (a) from excel to a new txt file. then I tried to paste a new column (b) next to the first column. but I got

a b
b
b

a
a

Scenario 2: I had two columns

a b
a b
a b

then I selected column of ‘b’ using the central button on my mouse and tried to replace with a column of ‘c’ which I copied from excel
but I got

ac
c
c

ac
c
c

ac
c
c

what should I do to achieve my real goal? Please let me know. thanks.

0 Likes

#2

I was able to paste a second column in to a blank area after the first and then select it and use shift+control+L to put a cursor on each line and use shift arrow keys to select the content of the lines (or shift end) and copy the text and then move the selection of cursors up to the previous column and paste.

0 Likes

#3

It appears that what you copied from excel has 3 line breaks (with a trailing one), whereas Sublime Text expects only 2 linebreaks to substitute 3 selections with the individual lines. Thus, Sublime Text saw 4 linese in your clipboard, which didn’t match the three selections, and pasted all clipboard contents into each selection.

0 Likes