bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#38717: display-line-numbers set to relative


From: Franco A. Cortesi
Subject: bug#38717: display-line-numbers set to relative
Date: Mon, 23 Dec 2019 01:35:55 -0300

Of course, evil-mode has a <gg> command, meaning "go to nth line", where the number of line is absolute and could be used with absolute_line_numbers. But I think nobody commonly uses this <gg> command, or at least, this command is not needed as relative line numbers allows the same behavior with the far more used and easier <j> and  <k> commands, meaning "nex-line" and "previous line". Also moving around with relative numbers will always be two digits (key presses) while absolute can be quite higher. I don't understand why relative line numbers are so uncommon.



Le lun. 23 déc. 2019 à 00:49, Franco A. Cortesi <cortesifranco3@gmail.com> a écrit :
When display-line-numbers is set to 'relative', the number of spaces before the digits starts growing (to two) when the current line hits 43 in my case. Of course, no other line has more than two digits as the screen only has 56 lines in total so the growing of spaces (and columns) is not needed at all and of course is undesired. This behavior seems to be correctly implemented but for absolute line numbers, where hitting line 43 means the bottom line is close to start showing numbers with three digits.

The current line always showing the absolute line number is another big problem as it will make the number of columns to grow and srink anyway. This growing and shrinking could be totally prevented if users were able to remove or configure the contents of the current line indicator. If configurable, a custom face would be also very good. For example a colored "-" indicating the current line would be nice for many users.

Lastly and less important, it would be great to be able to remove the space before the first numeric character! To make line-numbers-mode as less invasive and noticeable as possible.


This feature (relative line numbers) is AWESOME, especially when used with evil-mode as it allows to navigate the code VERY fast by prefixing next/previous-line commands with exact numbers. No "fast mental math" (when using absolute line-numbers) or inaccurate guessings are needed, only correct information. But I think the first two issues should be addresed to make relative line-numbers really usable without drawbacks.

Thank you for reading.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]