Lesim-mode is an Emacs major mode to write and run Learning Simulator scripts. To learn more about the Learning Simulator, see this short article and the online documentation.
Lesim-mode helps to ensure that a script is correct by highlighting common errors, like misspelled keywords and stimulus elements.[fn:markus]
You can run Learning Simulator scripts directly from lesim-mode buffers. Errors are reported in the minibuffer and highlighted in the script buffer.
For integration with org-mode, see ob-lesim mode.
[fn:markus] However, lesim-mode does not understand the full Learning Simulator syntax. That is a job for Superman, that is, Learning Simulator chief software architect Markus Jonsson.
Install from MELPA, then add (require 'lesim-mode)
to your Emacs
init file (e.g., .emacs.d/init.el
).
Syntax highlighting is enabled automatically.
C-c C-c
runs the script in the Learning Simulator, highlighting any
error.
Even without running a script, some common errors are highlighted (not 100% accurate).
Hovering on an error with the mouse pops up a description. C-c C-n
moves to the next error, displaying a description in the minibuffer.
TAB
and Shift-TAB
in move between fields in phase blocks, and by
word elsewhere. They also align phase blocks at |
signs and
parameter blocks at =
signs.
C-c C-t
inserts a template script (see Configuration).
C-c C-l
re-highlights the whole script, in case something looks
funny.
Using M-x customize-group lesim
you can configure:
- The command used to run the Learning Simulator (default:
lesim.py
). - The key bindings mentioned in the previous section.
- Whether to insert a template script when opening an empty
.les
file (default:nil
).
Please use issues on Github for bug reports and feature requests.