2

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

2
  • :!view % might do it, but is not a diff. I think we have a Q somewhere about getting the diff…
    – D. Ben Knoble
    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
    Dec 2, 2021 at 18:48

1 Answer 1

3

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 that you have read and understand our privacy policy and code of conduct.

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