Questions tagged [line-numbers]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
19
votes
2answers
3k views

A faster method to obtain `line-number-at-pos` in large buffers

The function line-number-at-pos (when repeated about 50 times) is causing a noticeable slow-down in semi-large buffers -- e.g., 50,000 lines -- when point is near the end of the buffer. By slow-down, ...
7
votes
2answers
2k views

Any way to get a working separator line between fringe/line numbers and the buffer?

is there any way to get a separator like the one for the split buffers (line in the middle of the image) for the line numbers/fringe? I tried (setq linenum-format "%4d \u2502 ") but that gives me a ...
15
votes
3answers
3k views

Show line number on error

Say that emacs throws some error that I don't understand. Or maybe the error says "Symbol's value as variable is void: modes", but there are many occurrences of the symbol modes in my code, so I need ...
26
votes
5answers
18k views

How do I display line numbers in emacs (not in the mode line)?

I know how to display line numbers (and columns) in the mode-line, but I'd like emacs to display the line numbers for all the lines on the left-hand side. I've seen this done in vim and other text ...
2
votes
0answers
1k views

Show both relative and absolute line numbers in Emacs 26

One of the new features in Emacs 26 is display-line-numbers-mode: Emacs now supports optional display of line numbers in the buffer. This is similar to what linum-mode provides, but much faster and ...
5
votes
1answer
862 views

Absolute line numbers on the current and relative line numbers on all other lines?

I know this plugin for relative numbers, which works fine (with the option (global-relative-line-numbers-mode). I also know this elisp code, which gives me perfectly working absolute numbers: (add-...
3
votes
1answer
591 views

Emacs relative and absolute line number at the same time?

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.
2
votes
1answer
137 views

Preserve original line numbering for a narrowed region

I noticed that whenever I narrow a region in emacs, the line numbering is relative to the narrowed region rather than being relative to the original file. Is there any way I can preserve the line ...
1
vote
3answers
525 views

How to have both fixed linum and relative linum?

I installed linum relative with this. But installing this replaced my fixed linum. I want to have both fixed line number and relative line number as well. How can I do this?