I am running gVim on WinXP.
I open a folder, select two files, and click "Diff with Vim". Screenshot:
The gVim GUI starts up, with each of the files in its own tab. I notice that each tab is in DIFF mode. However, there is no comparison being made between the two tabs. Both files are completely different, yet there is no highlighting, nothing - just a gray line on the left, which I interpret to be the 'DIFF' mode:
What is going on? Is my vimdiff not working or is it something else?
My SOLUTION
Earlier, when I needed to Open files in multiple tabs using the Windows Context Menu, I followed a poster's advice and added the following line to my .vimrc file: :autocmd BufReadPost * tab ball
While that allowed me to open two files in separate tabs in a single Vim window, I lost the ability to diff the two files, if I wanted to. The solution to turn on both these features is to enable the autocmd
above only in the case where I do not want to diff the two files, which happens when &diff==0
. Thus, when I modified the code in my .vimrc file to the below, I regained my Diff with Vim functionality:
if (&diff==0)
:autocmd BufReadPost * tab ball
endif
I've also added this solution to the comments portion of the Vim Wikia link mentioned above.