[gretl main page]

gretl_edit

gretl_edit is a lightweight, special-purpose supplementary program for use in conjunction with gretl. It comprises a tabbed script editor along with apparatus to execute scripts (via gretlcli) and view their output.

You're probably aware that the gretl GUI program has its own built-in script editor. So why are we offering a stand-alone editing program? Well, here's the context for which gretl_edit is designed: You're working on a relatively complex code project which involves defining several functions (perhaps you're designing a function package) and wish to carry out the following sort of cycle.

  edit code
  execute the code, inspect results, check for bugs
  revise code
  execute again...

If that's something you do from time to time, we recommend giving gretl_edit a try. If it's not, you can probably ignore this program.

Note that gretl_edit is “stateless”. Unlike the main gretl GUI, there are no saved models, matrices, bundles and whatnot. The only state preserved is that of the script, or scripts, being edited (well, with one exception noted below). In the context we're talking about that's probably what you want: each time a script is executed it starts with a “blank slate”. That means that if a script uses a dataset, it must include a command to open the dataset.

Obviously, gretl_edit supports hansl, gretl's own scripting language. Less obviously, it also supports languages that are covered by gretl's “foreign” apparatus: R, Octave, Julia, Ox, Python and Stata. In the foreign case the script editor is not as full-featured as for hansl: it offers syntax highlighting but not automatic indentation or auto-completion.

For hansl code, gretl_edit offers special means of navigating in the realm of function definitions:

 

function signature query

Platform specifics

MS Windows: Our gretl installers for Windows include gretl_edit.exe. You can find it in the gretl folder under “Program Files”.

Linux: The gretl packages for Debian and Fedora include gretl_edit.

macOS: gretl_edit can be installed via a supplementary package; see here for details.