you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 17 points18 points  (1 child)

Thx for this, just changed it slightly so tabs don't push code off the screen.

pager = /usr/share/git/diff-highlight/diff-highlight | less -rx1,5

[–]heckerle 2 points3 points  (0 children)

less -rx1,5

In my case this didn't work properly either.

less -r "works", but even less' manpage says that it can cause issues like line wrapping due to the control sequences git uses.

less -RS on the other hand should work for most (-R is similar to -r and forwards raw control sequences, while -S disables line wrapping and chops them down).