Closed odnoletkov closed 4 years ago
My first reaction is I like it. But then I think about how it will complicate the implementation, and I can't come up with any use cases other than the one you cite. So maybe start by making it od
only, but even that's a little bit weird because now 1yod
targets the same window as Fugitive's d2o
map, and the built-in 1do
targets the first buffer, not the first window. Three different semantics, what a mess!
I also don't see any real use cases other than for 'diff'.
It is a mess indeed. But I don't think this change would add too much to it. These three different semantics are already there – conflicting and causing confusion.
Also the git mergetool
use case don't have this problem with different semantics at all. So it will only benefit from the change.
Another argument is yod is not very useful on its own in practice. Almost always I want to toggle diff in some other window – not in the current window.
If the implementation isn't too onerous I don't see much downside. Feel free to submit a PR for review. Stick to the diff family unless it's trivial to extend it to the rest of the maps.
So 2yod would toggle 'diff' in the second window.
Handy with mergetool or Gdiffsplit!. Excluding local or remote version from the diff temporary helps to understand and resolve many conflicts.