0

I have set my number line relative to cursor as such:

(global-display-line-numbers-mode 1)
(setq display-line-numbers-type 'relative)

But, In a long file with line-difference more than 4digit (1000+), change in 3digit to 4digit makes my text jump when I move around. ( https://asciinema.org/a/gCKoaT7DymQoDiFklHBKJHBgC ).

This answer 7years, suggests to customize relative-line-numbers-format variable. But I don't know how.

how change set relative line number 4-digit, or whatever-many-digit?

Garid
  • 641
  • 1
  • 14
  • I don't think there is a relative-line-numbers-format variable any longer (at least I can't find it after loading display-line-numbers). But do C-h v display-line-numbers-width and see if that helps. – NickD Sep 14 '22 at 09:52

1 Answers1

2

Following, command removes the issue by setting the width longer.

(setq display-line-numbers-width 4)

This only works in a current buffer, I still couldn't figure it to make globally change it.

Added to my keybindings, so that I use it each time opening big org-files.

Garid
  • 641
  • 1
  • 14