3

I don't mean hybrid line number mode, I want the absolute line number appears for all the lines, not only the current line number.

Luis Veliz
  • 139
  • 3

2 Answers2

1

display-line-numbers-mode to display line numbers for the current buffer.

global-display-line-numbers-mode to display line numbers for all buffers.

Name
  • 7,689
  • 4
  • 38
  • 84
0

This is done in the linum-relative package

Felipe Lema
  • 737
  • 3
  • 11
  • Is https://github.com/coldnew/linum-relative/issues/4 implemented? It looks like what the OP is asking for, but it's still open... – npostavs Dec 23 '16 at 01:38
  • Oh, I misunderstood you. No, having both relative and absolute line numbers for all lines is not implemented. I thought you meant "current line as absolute, rest as relative" – Felipe Lema Dec 23 '16 at 12:16
  • 3
    Emacs 26 will offer native line number support: https://www.reddit.com/r/emacs/comments/6hux6a/native_display_of_line_numbers/ – zngguvnf Aug 21 '17 at 17:30
  • care to explain how to get absolute line number on current line but relative line numbers on the rest of the lines? It sounded like that's what you were referring to, but I didn't see any way of doing that in the github README for linum-relative – dylnmc Dec 29 '17 at 18:39
  • In the [Setup & Tips](https://github.com/coldnew/linum-relative#setup--tips) section, it says that activating `linum-mode` should be enough _given that you have installed the package_ – Felipe Lema Dec 29 '17 at 18:48