I have a file that I want to compare with itself. The first file is the original file and the second file is the one being developed. One method would be git diff, but wont work, if the original itself has been changed and not staged yet. Another method would be to make a copy of it on the file system and use the diff and watch command. This isnt efficient because of creation and deletion of temp files.
I would like to hence try the dodiff command in VIM. VIM can store files as buffer in memory and hence my question is how should I do it?
Please note that the files are not changed from within the vim environment, but from an external editor.
Example:
- file1.txt - original
- This contents are now changed in the file1.txt
- load file1.txt in vim
- The contents of the file are again changed
- compare 3 wih 4.
- The contents of the file are again changed
- compare 3 with 6 automatically, maybe something like automatic refresh.

