-
Notifications
You must be signed in to change notification settings - Fork 189
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
problem with undojoin snippet #134
Comments
I found this https://vi.stackexchange.com/a/13401 augroup fmt
autocmd!
au BufWritePre * try | undojoin | Neoformat | catch /^Vim\%((\a\+)\)\=:E790/ | finally | silent Neoformat | endtry
augroup END
Only "downside" is that you must hit enter when the file changed outside of vim and you selected "y" to overwrite it and Neoformat is run after that. |
sbdchd/neoformat#134 Signed-off-by: Boelensman1 <me@wiggerboelens.com>
Can we have this in the README? |
At present, Neoformat is unable to resolve the local Prettier version. Also would surface occasional errors on save (sbdchd/neoformat#134).
At present, Neoformat is unable to resolve the local Prettier version. Also would surface occasional errors on save (sbdchd/neoformat#134).
@hoschi proposed a nice fix for issue sbdchd#134, I hope it can be put on the front page, in README.md.
Hey, thanks for this. What's the deal with the double call to I suspect the following to do just fine, right?
au BufWritePre * try | undojoin | Neoformat | catch /E790/ | Neoformat | endtry |
I'm just copying the snippet from sbdchd#134, because I've run into the same issue and the proposed fix worked for me
The error "E790: undojoin is not allowed after undo" appears when writing a file with :w right after performing an undo operation. See the following URLs for more information: * sbdchd/neoformat#134 * https://vi.stackexchange.com/a/10326
With the snippet
I get an error when writing the buffer again after undoing a change:
The text was updated successfully, but these errors were encountered: