Page 1 of 1
New Macro Tag Request
Posted: 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.
Posted: Mon Jul 02, 2012 11:37 pm
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:
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.
Posted: 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!
Posted: Wed Jul 04, 2012 4:54 am
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
document_type = macro_tag("$DTD")
key_macro() -- run the macro
your willingness to consider suggestions and the responsiveness with which they get implemented are excellent!
Generally I am always very happy when people offer suggestion on how to make Zeus better.