Rick Onanian - 2007-09-24

I searched the forum quite a bit, using the terms in my subject line. Hopefully the next person to search will find the answer more easily. I finally found the answer in another question when I searched for the term "vertical". I found it in this message:
"Inserting an Alt-selected block of text"
https://sourceforge.net/forum/message.php?msg_id=3329826

where an anonymous user wants to know how to AVOID doing what I was trying to do. He wrote:
> If I insert an Alt-selected (vertical) block of text into a document, npp will not be
> coerced into inserting the appropriate number of newlines, so that the inserted text may end
> up sitting at the start of existing lines, which is where you wouldn't necessarily want it.

I had this question:

-----
How can I merge two text files, appending the contents of one to the ends of corresponding lines in the other?

I ended up doing it at a Cygwin prompt, but in the future I'd like to be able to do it as easily in Notepad++. The description of the unix "paste" command at http://articles.techrepublic.com.com/5100-6345-5031653.html is what I'm looking for. Here's how they describe it:

$ cat File1
Jack Wallen
Jessica Wallen
Johnny Wallen
Jeri Wallen

$ cat File2
123-45-6789
234-56-7890
345-67-8901
456-78-9012

$ paste file1 file2 > file3
$ cat File3
Jack Wallen  123-45-6789 
Jessica Wallen  234-56-7890 
Johnny Wallen  345-67-8901 
Jeri Wallen  456-78-9012
-----

The answer, then, is to open both files in N++, alt-select one, and paste it in the column desired in the other. The only difficulty is that when you alt-select and the lines end on different columns, the last line you select is the width of your selection. So, if you alt-select this block:
Average = 89ms
Average = 143ms
Average = 110ms
Average = 54ms
then the middle lines will have the 's' cut off. The solution is to temporarily pad the last line with spaces.