New Macro Tag Request

Get help with the installation and running of the Zeus IDE. Please do not post bug reports or feature requests here. When in doubt post your question here.
Post Reply
pwdiener
Posts: 134
Joined: Wed Jul 11, 2007 3:45 pm

New Macro Tag Request

Post by pwdiener » Mon Jul 02, 2012 4:40 pm

Would it be possible to add a new macro tag to reflect the language (document type) of the current file? This isn't that hard to detect from the file extension, I realize, but since Zeus has already done that classification, it might make language-dependent macros a little bit more robust, with less code redundancy. Some languages also use multiple file extensions for a document type (depends on shop conventions, I guess), so specifying this in one place rather than Zeus config + one or more language-dependent macros would be a nice convenience.

Bill Diener

jussij
Site Admin
Posts: 2449
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Mon Jul 02, 2012 11:37 pm

Hi Bill,
Would it be possible to add a new macro tag to reflect the language (document type) of the current file?
Sure. I create a new macro tag described as follows:

Code: Select all

$DTD   i.e the DocumentTypeDescription
So for example given a COBOL active document this new tag would return the following string:

Code: Select all

Cobol Document Type
Even though it the Zeus configuration is wrong since it should have been configured as COBOL Document Type ;)

That should work don't you think :?:

PS: I could also parse the string to remove the Document Type portion but I am not sure that is a good idea.

Cheers Jussi

pwdiener
Posts: 134
Joined: Wed Jul 11, 2007 3:45 pm

Post by pwdiener » Tue Jul 03, 2012 3:34 pm

That would work perfectly!

To me, this is one of the key things that sets Zeus apart from some of the other editors I've used - your willingness to consider suggestions and the responsiveness with which they get implemented are excellent!

Bill Diener

jussij
Site Admin
Posts: 2449
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Wed Jul 04, 2012 4:54 am

Hi Bill,

This latest patch include the new $DTD macro tag: http://www.zeusedit.com/z300/zeus-beta-patch.zip

Here's an example:

Code: Select all

function key_macro()
    document_type = macro_tag("$DTD")
    message(document_type)
end

key_macro() -- run the macro
your willingness to consider suggestions and the responsiveness with which they get implemented are excellent!
Thanks :)

Generally I am always very happy when people offer suggestion on how to make Zeus better.

Cheers Jussi

Post Reply
kuchnie warszawa opinie

Who is online

Users browsing this forum: No registered users and 30 guests