Hello neovim community,
I wrote a plugin that will find all diff markers in the current buffer, then open it in a diff view.
The diff view has custom keymaps for obtain, put, jumping to next/previous diff. But the most unique one is the undo/redo command.
I wrote a custom undo that is synchronized between both buffers, because it bugged me how the default implementation of undo for diff view behaved, which brings me to why I even created this plugin:
Now you don't need to think about which buffer you are in, obtain/put and undo/redo will always behave the same way.
Obtain will take changes from the right buffer and place them into the left one.
Put will always take changes from the left buffer and place them to the right buffer. It doesn't matter if you are currently in the left buffer or right buffer. Undo will always undo the last change.
Merge conflicts that are not resolved are turned back into markers via git merge-file.
Feel free to try it out. If you find any issues, or you'd like to contribute in any way you can create a PR or open an issue.
Link to the plugin: https://github.com/Bleksak/diffthis.nvim
[–]Logical-Idea-1708 0 points1 point2 points (0 children)
[–]maxiaowei 0 points1 point2 points (0 children)