Live data from Hacker News

Delta: A syntax-highlighting pager for Git, diff, grep, and blame output

github.com

41–50 of 98 posts

Re: Delta: A syntax-highlighting pager for Git, diff, grep, and blame output

#41
post #10

Earlier quoted context omitted.

I love broot, I use it for everything. I also use foot+fzy as a tiny sway dmenu replacement.. I started to make other kinds of custom tiny TUI popup menus using this strategy and it's great, since it all uses my terminal style and each is an extremely tiny 1 or 2 line script.

can broot scroll the file preview on the right? ranger can do it, so far I feel ranger is better

It can but it scrolls the cursor instead of managing real mouse scroll events a la vim mouse=a so it's not ideal.

tbh I prefer to use less for previewing files anyway.

Re: Delta: A syntax-highlighting pager for Git, diff, grep, and blame output

#42
post #6

Earlier quoted context omitted.

Difftastic and Delta work not only in bare terminals. Both are supported by Magit in Emacs, both are also supported by Lazygit.

What??? Do I have to set something in Magit for that to work? That would be one of the coolest news in weeks!

I second this question.

Re: Delta: A syntax-highlighting pager for Git, diff, grep, and blame output

#43
post #29
post #4

I use both delta and difftastic (difft), and cannot recommend them enough. If you use the terminal at all, get them!

I've been using difftastic for a while. How do you use both together?

... and this one.

Re: Delta: A syntax-highlighting pager for Git, diff, grep, and blame output

#46

Delta is great for what it does, but I consistently hit an issue where it truncates long lines. This post inspired me to check if the situation had changed... and it has! Now if you set `git config --global --replace-all delta.max-line-length 0`, it will no longer truncate lines. It's unclear to me why this is not the default. Discussion about the change is in https://github.com/dandavison/delta/pull/290 .

> It's unclear to me why this is not the default

It's literally in the PR you mention:

syntax-highlighting very long lines (e.g. minified .js) will be very slow if they are not truncated

Re: Delta: A syntax-highlighting pager for Git, diff, grep, and blame output

#47

Delta is great for what it does, but I consistently hit an issue where it truncates long lines. This post inspired me to check if the situation had changed... and it has! Now if you set `git config --global --replace-all delta.max-line-length 0`, it will no longer truncate lines. It's unclear to me why this is not the default. Discussion about the change is in https://github.com/dandavison/delta/pull/290 .

> It's unclear to me why this is not the default It's literally in the PR you mention: syntax-highlighting very long lines (e.g. minified .js) will be very slow if they are not truncated

If you read the comments, you’ll find https://github.com/dandavison/delta/pull/1746 which adds the option I mentioned, which limits the length of syntax highlighting, but still has a rather low limit on maximum (unhighlighted) line length :)

Re: Delta: A syntax-highlighting pager for Git, diff, grep, and blame output

#48
I use a modified version of vimdiff as my daily diff tool: https://gist.github.com/PhilipRoman/60066716b5fa09fcabfa6c95...

I find it easier to navigate that way since the diff of each file is in its own tab (yes I know... not how tabs are meant to be used)

For grep, vim's built in location list seems good enough. As for blame, I haven't used it since learning about git log -L. Vastly superior in my opinion.

Re: Delta: A syntax-highlighting pager for Git, diff, grep, and blame output

#50
post #6

Earlier quoted context omitted.

Difftastic and Delta work not only in bare terminals. Both are supported by Magit in Emacs, both are also supported by Lazygit.

What??? Do I have to set something in Magit for that to work? That would be one of the coolest news in weeks!

https://github.com/jesseduffield/lazygit/blob/master/docs/Cu...
Post reply on HN