For an OCaml beginner, the recommended editor of choice is Visual Studio code with the ReasonML plugin. See editor setup.
Visual Studio Code
- VSCode-Reason: The Reason/OCaml plugin for Visual Studio Code. Allows for all the advantages provided by Merlin with the convenience of the VSCode IDE.
- VSCode-OCaml-platform: in-development. OCaml extension for Visual Studio Code.
- tuareg: OCaml mode for Emacs that can run the toplevel and the debugger within Emacs.
- Vim only really needs
merlin, and optionally,
automatically configures several editors to use merlin, ocp-indent, and ocp-index if they are installed.
opam install user-setupto install it, and then follow the instructions, which tell you to run
opam user-setup install.
- merlin: the main tool used to provide information to editors about OCaml codebases. Note that to provide information, the code must first be compiled. Dune is able to automatically create /.merlin/ files, which are needed to help merlin find the compiled files.
- ocp-index: Easy access to the interface information of installed OCaml libraries. Contains a few standalone tools:
- ocp-indent is a coding style formatting tool that relies on heuristics and partial parsing rather than a full end-to-end parsing and printing approach, like ocamlformat below. The advantage of ocp-indent’s approach is that even partially-compiling files can be indented, as can code fragments.
- ocamlformat is a comprehensive coding style formatting tool that parses the code
and prints it out again. This follows the example of the
refmttool for Reason. While new,
ocamlformatmay eventually overtake
- utop: Very powerful toplevel for OCaml, that is far better than the default one. A must-install for every OCaml programmer.
- sketch.sh: Online tool for playing around with OCaml (most up-to-date version).
- odoc: An automatic documentation generator for OCaml that creates beautiful html.
- Try OCaml: Try OCaml in your web browser.
- codingground: Compile and execute OCaml code online.
- mdx: Tool for executing code or shell snippets inside markdown files.
- iocaml: An OCaml kernel for the IPython notebook.
- ocamlbrowser: A source and compiled interface browser, written using LablTk and included with it.
- ghim: A command-line tool to manage Github Issues.
- OCaml Yeoman Generator: Yeoman generator to scaffold OCaml modules.
- Dead Code Analyzer: OCaml dead code analysis.
- Bisect_ppx: A coverage tool for OCaml.