I have been using Sublime Text 2 for some quick multi-line text editing to clean up some CSV files. I have two files that are formatted similarly: two columns delimited by a common string. I have selected all the text in the first columns in both files. Both files have an equal number of lines.
What I am attempting to do is copy all the selected text from the second file and paste it into the first file, replacing text line by line.
Here is an illustrative example:
File 1:
abcd,xyz
bcde,yzx
cdef,zxy
File 2:
hijk,mno
ijkl,nom
jklm,omn
In file 1, I have selected the emphasized text:
abcd,xyz
bcde,yzx
cdef,zxy
In file 2, I have selected the emphasize text:
hijk,mno
ijkl,nom
jklm,omn
I could like to copy the text from file 2 and paste to file 1, and have file 1 result in the following text:
hijk,xyz
ijkl,yzx
jklm,zxy
Currently, when I copy and paste, the result is that the entirety of the copied text from file 2 is pasted to replace each line in file 1, resulting in the following:
hijk
ijkl
jklm,xyz
hijk
ijkl
jklm,yzx
hijk
ijkl
jklm,zxy
This is not what I desire. For sake of completeness, I should note that while there is an equal number of lines, the length of the text on each individual line does not necessarily match as in my example. Line 1 being copied may be ‘foobar’ while line 1 being replaced may be ‘foobarbaz’ or even ‘foo’.
Thoughts? Help? Thanks you in advance!