let-def / ocp-indent-vim

Integration of ocp-indent to vim.
MIT License
29 stars 8 forks source link

Differences between ocp-indent's vim plugin #6

Open rgrinberg opened 9 years ago

rgrinberg commented 9 years ago

Could you comment on the differences between this plugin and the official one at:

https://github.com/OCamlPro/ocp-indent/blob/master/tools/ocp-indent.vim

I've been pretty happy using your plugin b/c I find that the official plugin messes up when used with undo. It would be good to know what the differences are in detail though.

let-def commented 9 years ago

I have no idea, it seems they updated the mode recently. Do it still mess up undo?

ELLIOTTCABLE commented 6 years ago

Unfortunately, it also seems that having opam-user-setup's configuration enabled (which links in ocp-indent's own ocp-indent.vim, overrides ocp-indent-vim's configuration:

:set indentexpr?
" indentexpr=GetOcamlIndent()

Even if I load your version afterwards, for some reason. I have to manually configure indentexpr:

augroup ocamlmaps | au!
   " ...
   " Need to override `ocp-indent.vim`'s built-in indentexpr with `let-def/ocp-indent-vim`'s.
   au FileType ocaml setlocal indentexpr=ocpindent#OcpIndentLine()
   " ...
augroup END
let-def commented 6 years ago

Interesting. I suspect that opam-user-setup pushes stronger... Probably this should be reported on their github. I don't even remember how ocp-indent-vim and their mode differ.