DiffOrig - see the changes you made

3 Points

Florian Beer Florian Beer

3 years ago

Convenient command to see the difference between the current buffer and the file it was loaded from, thus the changes you made.

Found here: https://github.com/jfrazelle/.vim

if !exists(":DiffOrig")
  command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis
        \ | wincmd p | diffthis


Lifepillar 1 year ago

See also :help DiffOrig ;)