APMonitor Model Syntax Highlighting

Syntax highlighting can improve the readability of the APM files. Syntax highlighting is supported in a number of text editor environments. Atom, gEdit, and Notepad++ installation instructions are listed below.

Notepad++ (Windows)

Notepad++ is a text editor that supports APMonitor file syntax highlighting. The add-in configuration is simply an XML file. To add syntax highlighting to, follow the following procedure:

  • Open Notepad++ and Select "Language"..."Define Your Language"
  • Select "Import" and browse to the apmonitor.xml file that is in the unzipped apm_syntax folder.
  • Right click an APM file and select "Open With"..."Choose default program...". If Notepad++ doesn't appear as one of the options, browse to C:\Program Files (x86)\Notepad++ and select notepad++.exe. When you open an APM file in the future, the model file will have syntax highlighting in Notepad++.

gEdit (Windows, MacOS, Linux)

The text editor gedit is available on Windows, MacOS, and Linux. It is released under the GNU General Public License (GPL) and is the official text editor of the GNOME desktop environment. There are also other text editors that support gtksourceview language definition files, but gedit is a nice simple, stable one.

If using Linux, gedit should already be installed as the default text editor on most distributions. If it's not installed, download and install using your package manager. If using Windows or MacOS, download gedit from the following location:


Windows

  1. Install gedit
  2. Download the apmonitor.lang file, and place it in <gedit install directory>\share\gtksourceview-2.0\language-specs
    • On 32-bit Windows this is C:\Program Files\gedit\share\gtksourceview-2.0\language-specs
    • On 64-bit Windows this is C:\Program Files (x86)\gedit\share\gtksourceview-2.0\language-specs
  3. gedit should now automatically detect the language and do syntax highlighting for any file ending in .apm. To turn it on manually, go to View >> Highlight Mode >> Scripts >> APMonitor.

Linux

  1. gedit should already be installed as the default text editor on most distributions. If it's not installed, download and install using your package manager, or from https://projects.gnome.org/gedit/
  2. Download the apmonitor.lang file. Follow the instructions at https://help.ubuntu.com/community/gedit#Syntax_Highlighting to put the file where it needs to go and to enable automatic language detection and syntax highlighting.

MacOS

  1. Install gedit
  2. Download the apmonitor.lang file, and place it in the language specs location (/Applications/gedit.app/Contents/Resources/share/gtksourceview-2.0/language-specs)
  3. If you haven’t installed gedit in your Applications folder, you should substitute /Applications for your directory.
  4. Restart gedit
  5. Thanks to Ben Feinberg for these instructions.
πŸ’¬