There are two files opened in Neovim like file1 and file2 which have similar code but subtle differences.
Just what I want to do is to compare those two files to find out where the deferences are.
In that case, what is the best way that I am able to do?
If in vscode, there are “compare” commands:
![image](https://global.discourse-cdn.com/free1/uploads/neovim/original/2X/a/a5c73b39ec68576402374d145757ba1a7b759fb2.png)
Tell me your informations, thanks.
If the two files are in two splits, try :windo diffthis
.
Otherwise, try :diffsplit
.
4 Likes
Wow, It’s so amazing!!!
I did it in perfect!
Thanks a lot, @zeertzjq ![:smiling_face_with_three_hearts: :smiling_face_with_three_hearts:](https://emoji.discourse-cdn.com/twitter/smiling_face_with_three_hearts.png?v=12)
kelbs
4
@zeertzjq @kay-adamof how do you turn off the diff after using :windo diffthis
?
also ask how to quick close windo diffthis
To turn off diff mode, you can use :windo diffo
or :windo diffoff