I typically use
set cursorline by default and it works reasonably well with my preferred color schemes (molokai, vividchalk, moonfly). In normal mode. In diff mode, it almost always screws things up. In particular comment lines are almost always unreadable when highlighted by both the diff colors and the cursor line.
Is it possible to setup my config so that
set nocursorline gets run any time I enter diff mode (whether starting with
nvim -d or using vim-fugitive to run
:Gdiff or manually starting
:diffthis) and then have it turn back on when going into normal highlighting mode?
P.S. It might matter that I'm running Neovim because I believe the startup order is different and setting GUI properties is available at a different point in the configuration process. However I'm hopping for something that works at both startup and when entering diff mode in an already running editor.