Topic: TABUMAT.VDM: Set the TAB's according to the words in a line (1 of 2), Read 61 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Tuesday, July 06, 1999 08:34 AM


For easier TABulator configuration I created

ftp://ftp.vedit.com/share/tabumat.vdm


It scans the current line and sets VEDIT's tabulators according to the words in this line.

Documentation is inside the macro.


Christian

 


Topic: Re: TABUMAT.VDM: Set the TAB's according to the words in a line (2 of 2), Read 21 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Tuesday, September 07, 2004 04:01 PM

On Tue, 06 Jul 1999 08:34:00 -0400, I posted my first version of
TABUMAT.VDM.


It automatically sets VEDITs TAB-positions according to the words or
"quoted items" in the current line.

So it's really easy to make a TAB-devided data file more readable.


For convenience the macro should be assigned to a key (e.g.
Ctrl-Shft-Q, near the TAB-key to be comfortable).
The appropriate line for this is in the macro's beginning as comment.


So one simply has to position the cursor on a pattern line or
(sometimes easier) create a temporary "ruler" line and then press
the assigned key.

I usually do it by creating that temporary line as line 1 at top of
the TAB-divided data and fill it with some "x" (divided by spaces!)
where I think TAB-stops are useful.

After pressing the assigned key I can see the results in the data.
If not o.k: Only repostion the "x"s in line 1 and do it again...

Example:

Original data:
name1[TAB]street1[TAB]tel1[TAB]age1
long name2[TAB]wide street2[TAB]external tel2[TAB]age2
name3[TAB]street3[TAB]telephone3[TAB]old age3

Insert ruler line:
x x x x
name1[TAB]street1[TAB]tel1[TAB]age1
long name2[TAB]wide street2[TAB]external tel2[TAB]age2
name3[TAB]street3[TAB]telephone3[TAB]old age3

Execute macro (the TABs are invisible here to show the effect):
x x x
name1 street1 tel1 age1
long name2 wide street2 external tel2 age2
name3 street3 telephone3 old age3

Since it's not perfect: fix ruler line and reexecute macro:
x x x
name1 street1 tel1 age1
long name2 wide street2 external tel2 age2
name3 street3 telephone3 old age3


Hey, it's not easy to describe... ;-)


The originally attached version was restricted to 32 TABs up to
column 254 (due to VEDIT's limits up to version 6.11)

(still available here:
http://ziemski.privat.t-online.de/vedit/macros/tabumat.vdm )


With the new VEDIT 6.13 there are max 257 TAB stops possible with a
max column of 65535.

So I created a new version of my macro to reflect that:

http://ziemski.privat.t-online.de/vedit/macros/tabumat2.vdm


Christian