sindrets / diffview.nvim

Single tabpage interface for easily cycling through diffs for all modified files for any git rev.
Other
3.85k stars 105 forks source link

Question: How to get word/character level diff highlight? #318

Closed dasupradyumna closed 1 year ago

dasupradyumna commented 1 year ago

Hello Sindre!

This is just a question, not an issue as such. I'm sorry, but your setup is just too visually appealing. How do I get the word / character level diff highlighting that can be seen in your README screenshots? I've tried searching online for a bit, and I've found diffchar.vim so far. Could you tell me what you used in your config?

Cheers ~

dasupradyumna commented 1 year ago

It was a mistake on my part... some other part of my config was setting DiffText group to DiffChange, and so the word level diff highlighting was effectively invisible. Sorry for the noise in the issues.

sindrets commented 1 year ago

No worries, glad you figured it out! Just to confirm: I'm not using any plugins to change how the diff highlighting works, I'm only adjusting the highlights.

SichangHe commented 1 month ago

For future reference, diffchar.vim plays pretty nicely with diffview.nvim for word-level diffing, especially when you enable linematch in :h diffopt the enhance line matching (my config for reference).

image

Hope this helps someone! Steven Hé (Sīchàng)