I have ~30.000 lines of badly indented OCaml code (including mly and mll files) and would like to indent them. I tried googling for variations of 'ocaml indent' the closest I can get is to use Omlet.vim and indent the code one line at a time (via C-f in insert mode). Is there a way to do the indentation for all the 30000 lines?
I use Emacs as my editor with this package installed:
http://caml.inria.fr/pub/docs/u3-ocaml/emacs/index.html
To indent existing code you need to highlight it and then use the key combination C-M-\
You can script this per file pretty easily and I find the indentation to be pretty good.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With