Change to Vimdiff mode with two files open in a split view in vim
Often I found myself starting an extra vimdiff session while I am actually working in another vim session. Finally, I took the time to search for a solution and I came up with the following two lines in my .vimrc
:
nnoremap <leader>dt :windo diffthis<cr>
nnoremap <leader>do :windo diffo<cr>
They blindly go through all windows in the current view and enables or disable vimdiff, so use them with caution if you are a split view junky.
That’s it,
iss