Disclaimer: I know now to use vimdiff
, dp
, dg
and the other commands related to diffing in Vim.
However, there's something which seems like it cannot be done.
I want to remap the cursor keys so that → moves the difference to the right and ← moves the difference to the left regardless in which buffer the cursor is currently placed.
The issue is that vimdiff
seems to have no understanding of a left or a right buffer, instead dp
(or :diffput
) moves the difference from the current window to the other window while dg
(or :diffget
) fetches the difference from the other window into the currently active one. But sometimes I place my cursor in the left window to put something to the right, sometimes the other way round. So I cannot simply map → to be :diffput
or :diffget
, I need some context about in which buffer the cursor is currently placed.
How do I achieve this?