Topic: Overlay.vdm (1 of 7), Read 72 times
Conf: VEDIT Macro Library
From: Scott Lambert
Date: Saturday, February 12, 2000 10:28 AM


Overlay.vdm will overwrite or insert with an user supplied text string at a specific column for a certain # of lines.

Defaults to the current line for the starting line and the current column for the specified column.

Available at the Macro Library at
http://www.pinc.com/~slambert

Scott

 


Topic: Re: Overlay.vdm (2 of 7), Read 73 times
Conf: VEDIT Macro Library
From: Paul Knudsen
Date: Friday, February 25, 2000 12:35 PM

Works great Scott! Nice work. And now, heheh since you're so accommodating, I have another request, actually two but related.

One would be to delete duplicate lines--that is, if there were two or more identical lines, the macro would leave only one. This would include duplicate blank lines.

Another would delete blank lines. Both, by option, could process the entire file, or lines within a block, or within a selectable number of lines down from the current line.

I should explain that here at work we use IBM's editor XEDIT, and our users have written lots of macros for it. Alas, it is soon going away, and so I'm pushing Vedit to colleagues.

And before you guys scold me, I am planning to learn Vedit macro programming Real Soon Now.

 


Topic: Re: Overlay.vdm (3 of 7), Read 79 times
Conf: VEDIT Macro Library
From: Fritz Heberlein
Date: Friday, February 25, 2000 01:32 PM

> One would be to delete duplicate lines--that is, if there were two or
> more identical lines, the macro would leave only one. This would
> include duplicate blank lines.

A couple of months ago i extracted the following lines from a macro
supplied by Greenview Data (don't rembember the name, sorry),
which do exactly what you want:

repeat(ALL) { //Search & delete duplicate lines
Search("^{.*}\N\1$",REGEXP+MAX+ERRBREAK)
Del_line()
}

Fritz


Dr. Friedrich Heberlein, Akad. Direktor
Seminar f. Klassische Philologie, KU Eichstaett
D-85071 Eichstaett / Bayern
Tel. +49 8421 931544
Fax +49 93 1797
Email sla019@...
http://www..../SLF/Klassphil/home.htm

 


Topic: Re: Overlay.vdm (4 of 7), Read 89 times
Conf: VEDIT Macro Library
From: Ted Green
Date: Friday, February 25, 2000 03:11 PM

Please note that this only deletes duplicate lines which immediately follow
each other, e.g. after sorting.

The code came from the e-email.vdm macro. Here is more of the relevant code:

//
// Sort e-mail addresses and remove duplicates.
//
Message("\nSorting e-mail addresses...")
Replace('"',"",REVERSE+ALL+NOERR) //Remove double-quotes
Sort(0,File_Size) //Sort entire file
//
Message("\nDeleting duplicate e-mail addresses...")
BOF
repeat(ALL) { //Search & delete duplicate lines
Search("^{.*}\N\1$",REGEXP+MAX+ERRBREAK)
Del_line()
}

Ted.

 


Topic: Re: Deldup.vsm (was: Overlay.vdm) (6 of 7), Read 88 times
Conf: VEDIT Macro Library
From: Paul Knudsen
Date: Monday, February 28, 2000 01:28 PM

Yep! That does it. I named it Deldup.vdm. Thanks.

 


Topic: Re: Overlay.vdm (5 of 7), Read 84 times
Conf: VEDIT Macro Library
From: Scott Lambert
Date: Saturday, February 26, 2000 10:54 AM

On 2/25/00 12:35:00 PM, Paul Knudsen wrote:
>Works great Scott! Nice work.

Thanks for the kind words. It is so nice to get feedback.

>One would be to delete
>duplicate lines--that is, if
>there were two or more
>identical lines, the macro
>would leave only one. This
>would include duplicate blank
>lines.
>
>Another would delete blank
>lines. Both, by option, could
>process the entire file, or
>lines within a block, or
>within a selectable number of
>lines down from the current
>line.

Sound easy enough, I will see what I can come up with. However I am fairly busy at the moment, so when is a big ? mark.

>I should explain that here at
>work we use IBM's editor
>XEDIT, and our users have
>written lots of macros for it.
>Alas, it is soon going away,
>and so I'm pushing Vedit to
>colleagues.

The first thing you need to do is write a Xedit.key file for Vedit. That would help your sales efforts.

Scott

 


Topic: Re: Overlay.vdm (7 of 7), Read 77 times
Conf: VEDIT Macro Library
From: Rich Hureau
Date: Tuesday, February 29, 2000 08:11 AM

Xedit, being a mainframe editor, had no "hot keys" - i.e. you had to hit ENTER for anything to take effect. The only thing close was the F keys. However, these could be redefined by the user. So, unfortunately, there doesn't seem to be any real way to do this.
Rich