AMPL language
Syntax Highlighting for the AMPL modelling language
Details
Installs
- Total 4K
- Win 3K
- Mac 863
- Linux 583
Jun 3 | Jun 2 | Jun 1 | May 31 | May 30 | May 29 | May 28 | May 27 | May 26 | May 25 | May 24 | May 23 | May 22 | May 21 | May 20 | May 19 | May 18 | May 17 | May 16 | May 15 | May 14 | May 13 | May 12 | May 11 | May 10 | May 9 | May 8 | May 7 | May 6 | May 5 | May 4 | May 3 | May 2 | May 1 | Apr 30 | Apr 29 | Apr 28 | Apr 27 | Apr 26 | Apr 25 | Apr 24 | Apr 23 | Apr 22 | Apr 21 | Apr 20 | Apr 19 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 2 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 5 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 | 1 | 0 | 6 | 0 | 1 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
AMPL package for Sublime Text 2
Provides syntax highlighting for the AMPL modelling language (.mod
, .dat
and .run
files).
Installation
Using Sublime Package Control (recommended): If you have installed Sublime Package Control, you can easily install the AMPL Language package via the Package Control: Install Package
menu item (shortcut: CTRL+SHIFT+P). Search for AMPL Highlighting
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 AMPL.
With Git: Clone the repository in your Sublime Text “Packages” directory:
git clone git://github.com/jackdunnnz/sublime-ampl.git AMPL
The “Packages” directory is located at:
- OS X:
~/Library/Application Support/Sublime Text 2/Packages/
- Linux:
~/.Sublime Text 2/Packages/
- Windows:
%APPDATA%/Sublime Text 2/Packages/
You can access it through the menu in Preferences
> Browse Packages...
OS X
On OS X, further configuration is needed in order for license files to be found (the environment variables need to be added manually to the sublime-build file). Create a file in Packages/User
named AMPL.sublime-build
with the following content:
{
"osx":
{
"env":
{
"ILOG_LICENSE_FILE": "path/to/access.ilm"
}
}
}
Replace path/to/access.ilm
with the actual path to your ILOG license file.
AMPL language
AMPL, an acronym for “A Mathematical Programming Language”, is an algebraic modelling language for describing and solving high-complexity problems for large-scale mathematical computation (i.e. large-scale optimization and scheduling-type problems).
AMPL is available from http://www.ampl.com/
Features
This package adds syntax highlighting for all built-in functions, as well as strings, numeric values (including Infinity
), and function arguments.
Comments are also highlighted. In AMPL, line comments are started by #
, and block comments are delineated by /*
*/
.
To solve an AMPL model, ctrl+B
(Build) will invoke AMPL on the .run
file for the model. This can be done from any of the files for the model, provided that the .run
script shares the same name as the current file e.g. building example.mod
would invoke AMPL on example.run
.
Support
This package is a port of the AMPL highlighting scheme for VIM. If there are any issues or suggestions to do with the highlighting, please let me know.