When I use :w
to save my JSON file, vim automatically adds some commas
at syntactically significant (?) places.
It does not happen when I use :x
or ZZ
. This started today.
I did not change anything about vim (expect just tab space).
Here’s an animated demonstration:
Do you have any suggestions? I can't figure out why this is happening.
autocmd BufWritePre
. If not debug your vimrc.:Xverbose w
where X is 9, 12 or 15 (increasing numbers provide further levels of detail...sometimes too much detail thus start lower and then go higher if necessary) If that doesn't lead you to the answer then follow the link Ralf provided.:autocmd
and:verbose
. Debugging yourvimrc
looks like a great post. Thank you very much.