How to merge 2 files into sublime text or any other editor so that 1 line of 1 file 1 line 2 file, etc. are combined

    1 answer 1

    I would do that. In the first file:

    1. Through the search taking into account regular expressions (this is the button with the icon " .* ") We find all the end of lines (In the search, specify the $ symbol)
    2. Select them all ( find all or alt+enter )
    3. Press shift+home to select the entire line (it seems it will be necessary to turn off line wrapping). Copy to clipboard.

    In the second file:

    Items 1 and 2 are the same as in the first file. Paste from the buffer (you can pre-space to put or tab, or the separator that you need).

    • For some reason, I did not succeed: I did everything as needed, the cursors appear, copied to the buffer - I insert, and there only the first line rises normally, the rest are simply replaced with the contents of lines 2 files - maksvolf
    • And the number of lines in the files is the same? Do you do so that multiple cursors appear in the first and second files? - Alexandr
    • Corrected the answer to a slightly different sequence of actions, the meaning is almost the same. - Alexandr