Page 1 of 1

Zeus + dfmt

Posted: Fri Mar 20, 2015 1:11 am
by jussij
The dfmt utility is code formatter for the D language and it's possible to configure Zeus to run gofmt each time the file is saved.

To make this work perform the following steps:

1: The first thing you need to do is build dfmt and add the resulting executable to the to the Zeus install folder.

The dfmt code found here:

2: Install the script found here.

That link contains details on how to install the script.

3: Use the Options, Document Types menu and edit the D Document Type and in the Triggers section add the d_dfmt.lua macro saved from the previous step to the File Save Postfix trigger field.

So How Does it Work?
The Zeus file save trigger allows a macro to be attached to any file save event and in this case the d_dfmt.lua macro is configured to fire whenever the file is saved.

NOTE: Other Zeus, D language specific features can be found here:
Using the Dscanner (D Language) inside Zeus
Using the D Programming Language with Zeus
Using the DCD with Zeus