tuareg icon indicating copy to clipboard operation
tuareg copied to clipboard

adjust begin..end indentation

Open johnwickerson opened this issue 7 years ago • 1 comments

I would like to adjust the indentation inside begin...end blocks so that they behave the same as (...) blocks. For example, if I write

if condition then (
  do_this ();
  do_that ();
  do_the_other ()
)

then the body of the if-expression is indented by one more level than the if-expression itself. But if I write the equivalent

if condition then begin
    do_this ();
    do_that ();
    do_the_other ()
end

then the body of the if-expression is indented twice -- once for entering the branch, and once for being inside a begin...end block.

Could there be an option in Tuareg to make my second code example be indented as follows?

if condition then begin
  do_this ();
  do_that ();
  do_the_other ()
end

Thanks!

johnwickerson avatar Aug 29 '18 13:08 johnwickerson

Related to https://github.com/ocaml/tuareg/issues/69#issuecomment-154382096

Chris00 avatar Sep 14 '18 20:09 Chris00