Syntax Highlighting for GAMS in TextWrangler/BBEdit

I do a lot of GAMS (General Algebraic Modeling System) model development on my Mac, but there is no graphical interface under OSX. So I put together a simple language module (syntax highlighting plug-in) for my favorite Mac text editor: Text Wrangler, which is the free, but still feature rich version of BBEdit. The plug-in is not perfect but it sure is great to edit in color.

To use it:

  1. Download GAMSCodelessLanguageModule.plist, Depending on your browser, this might open as a text file. In which case hit the back button and right-click on the link and choose Save As.
  2. Put the file in: ~/Library/Application Support/BBEdit/Language Modules or ~/Library/Application Support/TextWrangler/Language Modules as appropriate [1], and
  3. Restart TextWrangler or BBEdit.

By default, *.gms files should be associate with the new plug-in. To use syntax highlighting with other files, select “GAMS (codeless)” from the language drop-down at the bottom of the editing window. If you are looking for other language modules check out the full list at the Bare Bones site.

Update 2012/02/29: [1] In Lion, the user’s Library folder is hidden in finder. The easiest work around is to use the Terminal to move the file from the download location to this folder. To do so:

  1. open Terminal from /Applications/Utilities/
  2. change directories to the download directory:  cd ~/Downloads (or your custom download location), and
  3. move the file with mv GAMSCodelessLanguageModule.plist ~/Library/Application\ Support/TextWrangler/Language\ Modules/ (edit for BBEdit). The back slashes allow for spaces in the path.

Update 2014/06/17: Relocated GAMSCodelessLanguageModule.plist to this same server.

This entry was posted in GAMS on Mac OSX, Tips & Tools. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    Markdown is turned off in code blocks:
     [This is not a link](

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see