5

I have two files, the first one contains this:

companyName
url
country
address
zip
founders
industry
isPrivate

and the second one contains this:

:companyName
:url
:country
:address
:zip
:founders
:industry
:isPrivate

Is it possible to easily merge the contents of the second file into the first one so it looks like this:

companyName   :companyName
url           :url
country       :country
address       :address
zip           :zip
founders      :founders
industry      :industry
isPrivate     :isPrivate
angelcool.net
  • 2,505
  • 1
  • 24
  • 26

1 Answers1

4

Well, that depends on what you mean with easily merge. The way I'd go about to do it would be the following:

In the file with the commas, place the cursor at the beginning of the first line, hold alt+shift and press the down-arrow key until you reach the last line, this enables multiple cursors.

Press shift+end so that you mark all the contents on each line. Press ctrl+c to copy.

In the other file repeat the first procedure, enabling multiple cursors, but do not copy, instead press endso that you get the cursors to the end of each line, press tabor space to get most of the lines where you want them and then press ctrl+v.

Finally you'll need to fix some of the lines like the one containing zip.

Daniel Figueroa
  • 10,348
  • 5
  • 44
  • 66
  • I got it working in a slightly different way, I highlighted everything on file 2 and then pressed _ctrl+shift+l_ (last character as in laravel) , copied it and then _ctrl+shift+l_ in file 1, pressed _end_ and pasted it. I tried your method after finding out how to do it, both ways worked fine :) – angelcool.net Jul 24 '15 at 23:52