-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: Why the ocamlformat plugin for vim stop me from storing me code? #2561
Comments
This should work with |
sorry for bothering you, but I have tried this one "autocmd BufWritePost .ml,.mli execute ':silent !ocamlformat % --inplace' | execute 'edit!'" |
Is here an error? Having a nice display of the errors is hard to do in Vim, you'd probably have more luck with a formatter plugin. |
You can run |
|
i am running Linux Mint
My ocaml version is 4.13.1
My ocamlformat version is 0.26.2
My vim version is 9.1
i add this to my vimrc
'''
call plug#begin('~/.vim/plugged')
Plug 'rgrinberg/vim-ocaml'
call plug#end()
autocmd BufWritePre .ml,.mli execute ':silent !ocamlformat % --inplace' | execute 'edit!'
'''
But after that, if i do sth like ':w' or ':wq', any new code i write that is not saved will be deleted. And the file is saved as the last version before coding.
ocamlformat works well in terminal.
The text was updated successfully, but these errors were encountered: