Zacros parses text files that follow a specific keyword-based syntax and can be generated by a text editor such as Notepad++ or Textpad. Such editors support syntax highlighting to make it easier for the user to read and modify the input. Within the Zacros distribution one can find the files that define the Zacros input language keywords for Notepad++ or Textpad. In this tutorial you will learn how to import these files and enable syntax highlighting for Zacros input files.

Syntax highlighting can facilitate the reading and editing of coded input; compare for example the following input with or without syntax highlighting, left versus right windows, respectively:

Screenshot of Notepad++ with and without syntax highlighting

This tutorial assumes that you have installed either Notepad++ or Textpad on your computer and will guide you in setting up syntax highlighting for these editors. To download and install the editors please refer to the following websites:

The former is distributed free of charge under the GPL License.

Syntax highlighting in Notepad++

Open a Zacros input file (for instance simulation_input.dat). In the Notepad++ menu select Language > Define your language... and then click on Import. Browse to the directory "syntax_highlighting" within the Zacros installation root. Locate and select the file "zacrossetup.xml". Click on Open and if all goes well you should receive the message "Import successful." Note that the "User Language" field now displays the value KMC_Setup and the textbox-fields are populated with the Zacros keywords. Close this window and go back to your document. If the text has not been highlighted yet, just select Language > KMC_Setup in the menu, and it should work. The same applies if you open another input file (say energetics_input.dat): just select Language > KMC_Setup; you don't have to re-import the xml language file.

Syntax highlighting in Textpad

Locate the file zacrossetup.syn in directory syntax_highlighting in the installation root of Zacros. Copy this file to the "system" directory of the Textpad installation (depending on your system and Textpad version, this could be: C:\Program Files\TextPad 7\system). Now open Textpad; in the menu, select Configure > New Document Class..., write KMC_Setup in the Document Class Name, and hit Next. In the following screen write: *_input.dat in Class members and click on Next. Check the box Enable syntax highlighting, and on the drop-down menu select zacrossetup.syn and click Next. In the next screen check that all the information is correct and click Finish.

If you now open a Zacros input file, the keywords should be highlighted in blue, comments in green, numbers in purple or brown and strings in black.

Are you using a different editor and have a syntax highlighting file to share? Please contact This email address is being protected from spambots. You need JavaScript enabled to view it..

Sorry, this website uses features that your browser doesn’t support. Upgrade to a newer version of Firefox, Chrome, Safari, or Edge and you’ll be all set.