Syntax Highlighting in Zacros

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:

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:

http://notepad-plus-plus.org/

http://www.textpad.com/

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 textboxes 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..