As the saying goes, if you do something for the first time, do it. If you do it for the second time, copy-paste the process. If you do it for the third time, find a way how to save the process somewhere so you don’t need to find and copy-paste it. And I need to diff some files again…
So, how to do it in my favorite editor vim? Easily.
- Open the first file.
- Open the second file in the same window (so you have the files side by side). This can be done with theCtrl + w vcommand.
- Then, in the first window type the command:windo :diffthis
Here you go.