Line and its value

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
JasonGH
Posts: 7
Joined: Sat Dec 07, 2013 12:24 am
Location: VA, USA

Line and its value

Post by JasonGH »

I have many text files with so many lines that I want to line up lines with its value. For example:

Line1
Line2
Line3
...
...
...
Linex
ValueofLine1
ValueofLine2
...
...
...
...
ValueofLinex

To become:

Line1 ValueofLine1
Line2 ValueofLine2
...
...
Linex ValueofLinex

How can I do it with Marco or RE?

Thanks in advance
User avatar
AmigoJack
Posts: 490
Joined: Sun Oct 30, 2016 4:28 pm
Location: グリーン ヒル ゾーン
Contact:

Post by AmigoJack »

Activate Configure > Block Select Mode.

Now you can select text vertically instead of only by lines. That way you can select all your lines of values (in the picture lines 109 to 115), then cut them, and then paste them after a few spaces of your first line (in the picture line 100) to have all previously selected lines appended to the existing ones at that place:

Image
JasonGH
Posts: 7
Joined: Sat Dec 07, 2013 12:24 am
Location: VA, USA

Post by JasonGH »

Thank you for your reply.

This one is totally manual work. I want to do with Macro and RE since we have thousands of text files with different line counts from 10 to 1000+ lines each.

All I want to do is: Open a text file - Run Macro - DONE.

Best,
ben_josephs
Posts: 2457
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

How do you determine how many lines there are in the keys (first) section and the values (second) section? Can it be arranged that they are separated by an empty line?
How do you determine the maximum length of the lines in the keys section?
Post Reply