This question already has an answer here:

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.

marked as duplicate by D. Ben Knoble, statox Jul 8 at 8:52

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

migrated from superuser.com Jul 7 at 20:23

This question came from our site for computer enthusiasts and power users.

  • 3
    Linter or plugin or both. – Alex Kroll Jul 7 at 20:32
  • 3
    Most likely it is some plugin. You may be able to identify the guilty by executing autocmd BufWritePre. If not debug your vimrc. – Ralf Jul 8 at 4:44
  • 3
    You can try :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. – B Layer Jul 8 at 5:17
  • 1
    I've learned a lot while reading about :autocmd and :verbose. Debugging your vimrc looks like a great post. Thank you very much. – 1t1e1 Jul 8 at 10:43

Browse other questions tagged or ask your own question.