undotree icon indicating copy to clipboard operation
undotree copied to clipboard

Customizing undotree_DiffCommand to "git diff --word-diff" is not colorized and not wrapped

Open jiangtianli91 opened this issue 4 years ago • 3 comments

Hello,

I tried to customize the undotree_DiffCommand from "diff" to "git diff --word-diff." However, the output is not colorized and not wrapped. I wonder how can I solve it.

jiangtianli91 avatar Dec 14 '21 06:12 jiangtianli91

You might need apply the syntax matching the git diff --word-diff format on the diff panel but I'm not sure if there's one.

mbbill avatar Dec 14 '21 06:12 mbbill

How about the softwrapping the diff window? It there a way to set it? I have to manually :set wrap each time now.

jiangtianli91 avatar Dec 16 '21 04:12 jiangtianli91

the diff window is tiny, so wrapping lines might have downsides like squeezing everything else out of the window. You may try to append the :set wrap after this line https://github.com/mbbill/undotree/blob/master/autoload/undotree.vim#L1251

mbbill avatar Dec 16 '21 04:12 mbbill