ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

GAMS language

by lolow ST2/ST3

Syntax Highlighting for the GAMS modeling language

Details

  • 2015.02.19.08.25.03
  • github.​com
  • github.​com
  • 3 years ago
  • 55 minutes ago
  • 5 years ago

Installs

  • Total 1K
  • Win 624
  • OS X 456
  • Linux 186
Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7
Windows 0 0 0 3 1 4 0 0 0 2 0 0 1 1 0 1 4 2 2 1 3 0 0 1 0 0 0 0 2 0 2 2 0 1 1 2 0 3 1 0 1 1 0 3 0 2
OS X 0 1 0 1 2 3 1 0 0 1 2 0 1 2 0 3 0 2 2 0 0 1 0 1 1 1 0 1 0 1 1 3 1 3 0 2 2 2 1 3 1 0 0 2 7 4
Linux 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1

Readme

Source
raw.​githubusercontent.​com

GAMS package for Sublime Text 2 and 3

Provides syntax highlighting for .gms and .inc files and shortcuts for running GAMS models.

Installation

Using Sublime Package Control (recommended): If you have installed Sublime Package Control, you can easily install the GAMS Language package via the Package Control: Install Package menu item (shortcut: CTRL+SHIFT+P). Search for GAMS Language in the list.

Without Git: Download the latest source zip from github and extract the files to your Sublime Text “Packages” directory, into a new directory named GAMS language.

With Git: Clone the repository in your Sublime Text “Packages” directory:

git clone git://github.com/lolow/sublime-gams.git "GAMS language"

It is necessary to rename the directory as “GAMS language”

The “Packages” directory is located at:

  • OS X: ~/Library/Application Support/Sublime Text 2/Packages/
  • Linux: ~/.Sublime Text {2,3}/Packages/
  • Windows: %APPDATA%/Sublime Text {2,3}/Packages/

You can access it through the menu in Preferences > Browse Packages...

GAMS language

The General Algebraic Modeling System (GAMS) is a high-level modeling system for mathematical programming and optimization. It consists of a language compiler and a stable of integrated high-performance solvers. GAMS is tailored for complex, large scale modeling applications, and allows you to build large maintainable models that can be adapted quickly to new situations.

GAMS is the property of GAMS Software GmbH (http://www.gams.com).

Features

You need gams or gams.exe in your PATH. Please update your environment variable PATH.

To launch gams, open your file.gms and type CTRL+B (Build).

Type CTRL+SHIFT+G to switch between the code file.gms and the listing file.lst.

In the GAMS listing, file.lst, type CTRL+R (Goto Symbol) to list and jump to the error statements.

GAMS Comments

In GAMS, by default, block comments are delineated by $ONTEXT/$OFFTEXT, and line comments are started by a star \*.

This package also adds the comment highlighting for end of line # and //, and the inline comments delineated by curly brackets: { } or in C-style with /** **/.

In order to GAMS to process these new comment conventions, you need to add in your code some of these commands:

$eolcom //
$eolcom #
$inlinecom {}
$inlinecom /* */

GAMS Custom launcher

You can create a custom GAMS call (“Build” in Sublime Text). Go to Preferences > Packages Settings > GAMS > Build Custom. It creates a file in User, called 'Gams Custom.sublime-build'. Copy the content of the default build file (Preferences > Packages Settings > GAMS > Build Custom) and modify the content according to your needs. Some examples are given in comment.

To use it, you need now to select Tools > Build System > Gams Custom in order to use it. Note that you can create several build files for your different needs.

Support

Any remarks, suggestion about the syntax highlighting have to be adressed to the author Laurent Drouet.