I use diff-hl to highlight changed lines. However it doesn't play well in terminal mode. I know that terminal Emacs doesn't support fringes, and it is better to use diff-hl-margin-mode instead, it works in terminal but margins are awful with linum.

GUI diff-hl-margin-mode:

enter image description here

...and the same situation in terminal. I tried nlinum instead, but with no luck. And also, i tried git-gutter, but couldn't get live update to work, btw it uses margins to mark changed lines and it looks like on screenshot.

How do you handle this? Any advice?


emacs-26 comes with a built-in line number mode, controlled by display-line-numbers which might combine better with other packages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.