Another popular feature of MZ-Tools 3.0 was the Add Code Template. In MZ-Tools 8.0 it has been renamed to Code Library and there are actually two code libraries: one in the Personal Options, for your own code templates:
The code template editor has been improved too. Now it has colorized syntax and it allows you to enter the author of the code template and an expansion keyword, which is any text that when typed in a code file followed by the keyboard shortcut associated to the “Expand Keyword” command, it will replace that text by the whole code template. You can also define a keyboard shortcut for the code template, as in MZ-Tools 3.0:
Once you invoke the Code Library feature, rather than a modal window, in MZ-Tools 8.0 you get a toolwindow that you can dock, keep floating, move to a secondary monitor, etc. The Code Library toolwindow has two tabs, one for the Personal code library and another for the Team code library. Also new in MZ-Tools 8.0 is a preview of the selected code template:
And there is also a button on the toolbar to change the orientation…
… so that you can get the preview below the tree instead of to the right:
The new Code Library can hold tons of code templates, so it provides a filter to find quickly the desired code template:
Finally, when you double-click a code template (or click the Insert button on the toolbar), the selected code template is inserted into the current code file. If the code template contains predefined variables, they are automatically replaced. And if it contains user-defined variables, you get a prompt dialog to enter their values. Also new in MZ-Tools 8.0 is the preview of the code template while you are entering the values:
So, the loved code library feature has been completely revamped in MZ-Tools 8.0, to be even much more convenient and to make you even more productive while writing code.