I just started to use the tuareg mode in emacs for ocaml programming. So can someone tell me what are the main advantages of using it? Can someone suggest me any tutorial for that?
3 Answers
11
votes
Tuareg-mode is good because it can parse code and calculate indentation & font-lock basing on this information. Plus it provides pretty good possibilities to interactive work with code.
Regarding tutorial - I don't think that such exists (although I planned to write it long time ago). All information for installation is in README file, and you can learn about available commands by visiting file with OCaml source code, and pressing C-h m
to get description of mode, or by getting description of tuareg-mode
function (if tuareg.el
is loaded already).
Useful addition to these descriptions is Tuareg mode refcard that lists all (or almost) available commands.
0
votes
0
votes
- Syntax highlight, indentation, as (almost) all language modes.
- Compile or evaluate in a top level from a single buffer (you no longer need to open a ocaml toplevel in a command line to test some crap functions)
- Caml-types minor mode : after a successful or partial compilation, you can easily point a variable and get the type the compiler inferred for it.