Is there a quick way to see the differences VIM is describing?

  • :!view % might do it, but is not a diff. I think we have a Q somewhere about getting the diff…
    – D. Ben Knoble
    Commented Dec 2, 2021 at 18:07
  • Might be an easier way but you can save a copy, e.g. :w %.tmp then diff with the original :!diff % %.tmp.
    – B Layer
    Commented Dec 2, 2021 at 18:48

1 Answer 1


Create a new window, read file from disk into it and show the differences. Kind of this

vnew +read\ # | windo diffthis

More complete version is discussed at :h diff-original-file. Also, a ton of variations in personal configs/gists/similar SO topics etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.