I am writing Ocaml code under Emacs. Currently, the indent style is like the following, that is, the code where a variable is defined by let is a little bit on the left of let.
let v = 5 in
Printf.printf "v= %d\n" v
I also see some files written by others, when I open them, the indent style is that the code is in the same column as let:
let v = 5 in
Printf.printf "v= %d\n" v
I think the second style looks better, does anyone know where I could setup Emacs so that my Emacs takes the second style?
Thank you very much!
look to the ‘tuareg-in-indent’ setting, that sets how much ident should be done (0 to disable) – you can customize it with M-x customize-variable…
P.S. you can also look to ‘tuareg-let-always-indent’ variable…