• GAMS mode goodies: Looking up the identifier part of a parameter, variable or set

    One of the nice features of Gams-Mode for Emacs is the possibility to quickly look up the identifier part of a variable, parameter or set. This is a nice feature in big models or when you haven’t worked with the model for some time. Just put the cursor somewhere on the parameter in the code you are looking at and hit F7. The screen will split and an additional side pane will appear.
    Here is an example: in the lower pane you see the file readdata.gms, where I am working on, and the cursor is on the parameter “total” (red
    Read the rest “GAMS mode goodies: Looking up the identifier part of a parameter, variable or set”

  • Emacs and Stata

    Although I am not a great fan of multi-tasking I often use a lot of programs simultaneously for one task: For example, when I am writing a report in Word or with Emacs, I take notes in Emacs, search the internet and have my model results in the gdx-viewer.  Additionally my mail client is somewhere in the background and nowadays I have a messenger program open to talk to my collaborators. I don”t like this jumping from one program to another, but it is often necessary. This is also one of the reasons I switched to Emacs, because I can
    Read the rest “Emacs and Stata”

  • Outline Mode in Gams-Mode for Emacs

    Let’s get to know the great things you can do with Gams-mode. In the previous post I showed how Gams-mode nicely colors your code, the syntax-highlighting. In this post we will look at the great way Gams-mode shows the results of your model run. This is done in the Gams-Outline mode.
    First run your model by hitting C-c C-s (C stands for Ctrl) or use the same command from the menu. Emacs will open a new window and you see how Gams solves your model. When Gams is finished you can hit F10 (or C-c C-v)  to show the listing
    Read the rest “Outline Mode in Gams-Mode for Emacs”

  • Emacs Goodies

    Often you have to repeat a series of keystrokes. That is probably boring if the number of repetitions is low, but gets really annoying if the number gets higher. A typical example is formatting data or text. Take the following text snippet where we have data coming from a comma separated file:
    and you would like to have this text in the following format
    A        410,
    B        243,
    Emacs makes this a very easy job: Start the macro recording with C-x (  or F3 (the C stands for the Control
    Read the rest “Emacs Goodies”

  • Syntax Coloring in Gams-Mode

    I suppose you have installed emacs and gams-mode for emacs (if not see my preceding posts) and now are eager to start working on your model.
    Let us start simple and get a model from the Gams-library. If you started emacs you are not in gams-mode (you can check this by looking at the menu bar: there is no gams-entry). If you load a gams model (with the extension “gms”), Emacs automatically turns on gams-mode and the gams entry appears in the menu bar (blue arrow). The first thing you probably notice is the syntax coloring. The coloring you will
    Read the rest “Syntax Coloring in Gams-Mode”