I would like syntax to be turned off when I am in diff mode to focus only on the differences. I have the following code in my
vimrc which works only when I start vim in diff mode from the command line :
if &diff syntax off endif
$ vim -d file1 file2 # works
But when I already have a file opened(
file1) and would like to diff it with another file(
file2) using the command
:diffsplit file2, the code doesn't work and I have to manually turn it off.
:echo &diff and it returned
1 meaning the code should be executed. Any ideas ? Thanks!