Atom Packages Directory

a package directory for a text editor of the 21st Century

Ocaml Indent

Install with:
    apm install ocaml-indent


Use ocp-indent to indent your OCaml code in Atom.


Each line is indented when a newline is inserted. Manual indenting can be done with the following commands.

Command Description Keybinding (Linux)
ocaml-indent:selection Indent lines containing selection or cursor ctrl-alt-i
ocaml-indent:file Indent file ctrl-alt-f


The recommended way to configure ocp-indent is with a .ocp-indent file in the project directory. See ocp-indent --help for more information. Command line arguments can be configured too if desired.


This package requires language-ocaml and ocp-indent. For autocompletion, linting and other features, ocaml-merlin is recommended.

sh apm install language-ocaml ocaml-merlin opam install ocp-indent

Keywords: ocaml, indent, ocp-indent Suggest keywords
Fork me on GitHub