diffview.nvim
diffview.nvim copied to clipboard
[feature] option for unified- / inline-diff
I love this plugin, so thank you very much for your work.
One thing I'm missing though is the ability to use inline-diffs, instead of side by side.
For lots of minor changes, I find it's a lot easier to read.
Sth like this:

Is this anything that is planned?
It is not planned, no. And honestly, I don't see a good reason to implement it in this plugin, seeing as there are many great tools for doing this already. I highly recommend checking out delta if you haven't already.
Using delta or simliar you can easily set up some custom commands for showing inline diffs:
" Open inline diff for changes in all files in a vertical split
command! DiffInline vsp | exe 'term git diff | delta' | startinsert
" Open inline diff for changes in current file in a vertical split
command! DiffInlineFile vsp | exe 'term git diff -- '
\ . shellescape(expand("%")) . ' | delta' | startinsert
Running these commands looks something like this:

Also, all git wrappers for vim that I can think of support inline diffs. That includes Fugitive and Neogit.
I'll keep this up for consideration. I might implement something like this at some point, but it's not a priority.
Thanks for responding, and the recommendations! Appreciate it
BTW, diffchar.vim is one option for this case.
Thanks for this great plugin.
I would really appreciate if diffview had this feature. I run most of my git commands in the terminal, but (re)viewing diffs is just much easier with diffview. It wouldn't make sense to install a git integration like neogit solely for the unified diff view, when diffview already is my diff viewing tool.
Would you deem this feature request out of scope, or would you consider it if there were enough demand and/or a PR adding this feature?