Sublime support for hansl scripting language: syntax-highlighting, auto-complete, snippets
- Total 27
- Win 16
- Mac 4
- Linux 7
|Apr 15||Apr 14||Apr 13||Apr 12||Apr 11||Apr 10||Apr 9||Apr 8||Apr 7||Apr 6||Apr 5||Apr 4||Apr 3||Apr 2||Apr 1||Mar 31||Mar 30||Mar 29||Mar 28||Mar 27||Mar 26||Mar 25||Mar 24||Mar 23||Mar 22||Mar 21||Mar 20||Mar 19||Mar 18||Mar 17||Mar 16||Mar 15||Mar 14||Mar 13||Mar 12||Mar 11||Mar 10||Mar 9||Mar 8||Mar 7||Mar 6||Mar 5||Mar 4||Mar 3||Mar 2|
Sublime support for Gretl's scripting language called Hansl. The package's features are:
Gretl build-systems (Batch mode, CLI, REPL)
Gretl is an open-source statistics and econometrics software: http://gretl.sourceforge.net/
Hansl is a recursive acronym: it stands for “Hansl’s A Neat Scripting Language”. For a primer on Hansl: https://sourceforge.net/projects/gretl/files/manual/hansl-primer-a4.pdf/download
I - Installation
This plug-in is available on package control. It's recommended to get it from there.
Steps fpr installation:
1) Call “Package Control” via the key-bind
2) Type “Package Control: Install Package” and search for “Hansl-Gretl-Language”.
Note: If you don't see this plug-in in package control is likely because you have a too old version of Sublime installed. The plug-in will only be visible with a build >= 3084.
Build 3084 of Sublime introduced a new format for syntax definition files. The documentation can be found here. This package makes use of this new syntax.
Once the package is installed, every file with an
*.inp file type will automatically be recognized as a Gretl file using the Hansl syntax. You should experience syntax-highlighting immediately. Otherwise, go through the menu:
View > Syntax > Hansl.
The new syntax will improve the way your Gretl/Hansl code is coloured:
Note: There are still some edgy cases left for improvement.
This feature is automatically activated for every
*.inp file. Start typing a gretl command, function name or name of an accessors and you will see some suggestions which can be accepted via the Tab key.
Snippets make you really productive! These are little templates which save typing. Simply open a gretl
*.inp file, and start typing
if. You will see some suggestions which can be selected via the Tab key again. Explore and start writing your own snippets.
Watch for a tutorial on snippets here: https://youtu.be/MeOaWR2T6TU
Support for build-systems is a great feature of the Sublime editor. They allow you to execute a program. I've added different build-system for Gretl such that you can run your Gretl script via the “gretlcli” program — Gretl's command line program instead of the GUI.
Three build-systems are configured (see ./build-systems/Gretl.sublime-build):
1) “CLI”: Execute a Gretl script in a terminal – non-interactive.
2) “Batch mode”: Execute a Gretl script and quit.
3) “REPL”: Interactive mode opening a command line interface.
The REPL requires the additional installation of the Terminus package for sublime. For a video tutorial on Terminus see here: https://youtu.be/mV0ghkMwTQc
For a great video tutorial on how to make a build-system interactive with Terminus I also recommend: https://youtu.be/etIJMVIvVgg
v0.2.0 (November 2020): - Added new additional snippets
v0.1.0 (May 2020): - Initial release