Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
Expand all | Collapse all

OPL syntax in Sublime text editor

  • 1.  OPL syntax in Sublime text editor

    Posted Thu February 04, 2016 07:58 AM

    Originally posted by: bp325


    I'm starting to work with quite long OPL scripts, for which small edits can take time to complete. I'd like to do most of the work in a text editor like Sublime, where everything is much quicker to apply, but it is quite difficult when there isn't a syntax highlighter that fits the OPL language!

    Does anyone know of the most similar language to OPL that might be more commonly available/whether it would be possible to request an OPL syntax for sublime?

    Thanks!

    Bryn


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: OPL syntax in Sublime text editor

    Posted Thu February 04, 2016 09:55 AM

    Originally posted by: FredericDelhoume


    As the scripting in OPL is ECMAScript, you might open the file in an external editor as JavaScript, or apply the JavaScript coloring afterwards.

    This might give you correct coloring for execute {} parts but you will certainy not have the coloring for

    other OPL syntax.

    I have no knowledge of Sublime, but it might be possible to write an OPL highlighting configuration file, starting from the Javascript one.

    See http://docs.sublimetext.info/en/latest/extensibility/syntaxdefs.html


    #DecisionOptimization
    #OPLusingCPLEXOptimizer