Topic: Inserting line numbers (1 of 6), Read 36 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Thursday, March 02, 2006 05:03 AM


As introduced in the conference "Basic editing, Block operations" -- "Inserting line numbers"
( http://webboard..../read?20356,43 ) I now finished the first version of the macro LINENUMBERS.VDM:

http://www.ziemski.net/vedit/macros/linenumbers.vdm


This macro inserts line numbers in front of lines of text.
It does it's work within,
- the highlighted block or
- the whole file,
beginning at the
- Begin_of_File/Block or
- the current cursor position.

The inserted numbers are,
- the real line numbers or
- a counter with first number and increment

The numbers will be inserted,
- unpadded or
- padded with
- leading &spaces or
- 0's
to a fixed ( ( ) minimized ) width

using as divider between number and text
- a literally given string or
- a translated list of space-separated hex/dec values
(e.g. "9" // a TAB (decimal)
"0x20") // a space (hex)




Please let me know about errors you may find.

And if there are suggestions for enhancements or so: The same.


Christian

 


Topic: Re: Inserting line numbers (2 of 6), Read 34 times
Conf: VEDIT Macro Library
From: Fritz Heberlein
Date: Wednesday, February 22, 2006 10:35 AM

Christian,

it's a pity that i don't have a real use for such a wonderful macro, but
i will use it as a specimen for dialog box programming!

Fritz

 


Topic: Re: Inserting line numbers (3 of 6), Read 34 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Thursday, February 23, 2006 02:02 PM

Fritz:

On Wed, 22 Feb 2006 10:35:00 -0500, Fritz Heberlein wrote:

>[...] such a wonderful macro,

Thanks.

>but i will use it as a specimen for dialog box programming!

Ahh, good!
That's one reason why I wrote it too: As an exercise for myself.
In the last months I didn't have much time for programming.
Today I had - and so I did it ;-)


Christian

 


Topic: Re: Inserting line numbers (4 of 6), Read 31 times
Conf: VEDIT Macro Library
From: Ted Green
Date: Wednesday, February 22, 2006 05:24 PM

At 09:10 AM 2/22/2006, you wrote:
>As introduced in the conference "Basic editing, Block operations" -- "Inserting line numbers"
>(http://webboard..../read?20356,43) I now finished the first version of the macro LINENUMBERS.VDM.
>It is attached.

Fantastic! (I got the fixed macro too.)

I am concerned that the dialog box is too tall for even 800x600 resolution.
It could be wider.

Ted.


Ted.
-------------------------------------------------------------------------
Ted Green (ted@...) Greenview Data, Inc.
Web: www.... Fax: 734-996-1308 PO Box 1586, Ann Arbor, MI 48106
Tel: (734) 996-1300 Desk: 734-369-3550 VEDIT - Text/Data/Binary Editor
-------------------------------------------------------------------------
www.SpamStopsHere.com ranked #1 in accuracy by Network Computing Magazine

 


Topic: Re: Inserting line numbers (5 of 6), Read 37 times
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Thursday, March 02, 2006 05:01 AM

On 2/22/2006 5:24:10 PM, Ted Green wrote:
>
>>[LINENUMBERS.VDM]
>
>Fantastic! (I got the fixed macro too.)
>
>I am concerned that the dialog box is too tall for even
>800x600 resolution. It could be wider.

Ouuuch!
My eyes are crushed now by all those huge characters: I tested 800x600 on my 20" monitor...


But you are right. The dialog is too tall.

Since it's not easy to position radio boxes etc. side by side in a nice way (tried it in the first version (see screenshots in the other discussion)) I now changed the dialog another way.

It is now reasonable sized in 800x600.

It's updated on my site.

Christian

 


Topic: Re: Inserting line numbers (6 of 6), Read 29 times, 1 File Attachment
Conf: VEDIT Macro Library
From: Christian Ziemski
Date: Thursday, March 02, 2006 05:10 AM


Since the macro now has so many options it might be annoying if a user has to change "his" options again and again on every use.

So I added a button "Save as default" which saves the currently choosen options in a file.

Every time the macro is called now it first checks for existence of that file and loads it's default options from there. These ones are presented in the normal dialog then.

This hopefully increases the usability.

I attached the new version of the macro to this message.

Christian

 
LINENUMBERS.VDM (10KB)