Questions tagged [linum-mode]

for line numbering modes, such as `linum-mode` and `line-number-mode` minor modes that show line numbers on the left screen edge for ease of editing and navigating. They do not insert line numbers in the file. `line-number-mode` also has a `column-number-mode`, which shows in the mode line.

Useful Links:

49 questions
66
votes
8 answers

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 editors. How do I do this for emacs?
programking
  • 7,064
  • 9
  • 41
  • 62
9
votes
2 answers

How can I fill the entire line number bar with a custom background color?

In the screenshot below I have simply set the background of the linum face to some color, however there is a blank region at the end of the buffer and there are gaps between the lines when line wrapping (global-visual-line-mode) is enabled: …
Lenar Hoyt
  • 1,163
  • 7
  • 25
7
votes
3 answers

where are emacs lisp files?

I'm trying to add line numbers to emacs, following this guide: Linum: Separating line numbers from text. I have to edit "linum.el" to add some code, however I can't find that file. I'm using ubuntu, I have tried using: find */* linum.el but I'm…
user5133
  • 73
  • 3
7
votes
2 answers

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 buggy weird broken lines with varying widths -.-
nemesit
  • 291
  • 1
  • 5
7
votes
1 answer

How to change line-number gutter width using display-line-numbers mode?

I am using (global-display-line-numbers-mode 1) in my init.el file and everything is working as expected. The only problem is that I find the gutter width to be too wide and would prefer it to match the size that's used when using (linum-mode 1). I…
dylanjm
  • 303
  • 2
  • 10
7
votes
1 answer

Problem with line number limit in linum-mode

I am using the term of Emacs to compile some code, with linum-mode enabled to display the line numbers for the terminal, and the line numbers stop increasing as soon as they reach 2049. If I write source code and I reach 2049 lines will this happen…
Adam
  • 2,407
  • 2
  • 21
  • 38
6
votes
1 answer

Line number (linum, nlinum) grow margin with increase in font size

When I turn on linum-mode or nlinum-modeand increase the font size via C-x C-+ it does not increase the size of the "margin" where the line number is displayed, so only part of the line number is visible. Is there a way to configure either of these…
Greg Nisbet
  • 857
  • 5
  • 19
5
votes
1 answer

Confusion with line numbers

When I enable line numbers in Emacs the cursor starts in a line with no number in it. If you press enter then the numbers increment but always there is a line with no number. Why is that happening?
Adam
  • 2,407
  • 2
  • 21
  • 38
5
votes
1 answer

How do I run a function on start-up?

How do I run an arbitrary function upon starting up Emacs? My specific problem: in spacemacs, I have added the following to the config section of my .spacemacs file: (add-hook 'evil-insert-state-exit-hook 'linum-relative-on) (add-hook…
Running Turtle
  • 467
  • 1
  • 4
  • 7
4
votes
1 answer

Bent arrow (↩) in visual-line-mode

I would like to see a bent arrow (↩) in the window fringe, when I'm using visual-line-mode becuse with no linum-mode (e.g. org, md, latex..) I'm not able to distinguish the lines. References: LineWrap
Francesco Cadei
  • 327
  • 3
  • 17
4
votes
1 answer

How can I move by screen lines as quickly as forward-line?

next-line is very slow, and this is creating problems. I'll give some background then explain why. By default, linum.el treats a wrapped line as a single line, and it takes into account hidden lines when numbering. I need it to number visual lines…
JCC
  • 989
  • 5
  • 15
4
votes
0 answers

"Invalid face reference: linum" even load linum after make frame

I want to have line number at buffer, but when I use Emacs server, the Message buffer display the following error: Invalid face reference: font-lock-comment-delimiter-face [2 times] Invalid face reference: linum Invalid face reference:…
astroboylrx
  • 141
  • 4
4
votes
0 answers

using global-linum-mode with ess with a latex/R knit file

When using global-linum-mode with a latex file that has blocks of R code (*.rnw file) moving in and out of the R code blocks cause the line numbers to disappear until the cursor is moved again. Is there a way to stop the disappearing line numbers or…
mjb
  • 91
  • 3
3
votes
1 answer

Line numbering: stick with linum or nlinum?

I see that both linum and nlinum are actively maintained: one is built-in, another recently had a release. With older Emacs version, linum used to be slow with a lot of folding in a buffer (e.g. in Org mode, and with hs-minor-mode in various source…
9000
  • 497
  • 2
  • 15
3
votes
2 answers

Elisp - Activate and Deactivate Linum-Mode when Goto-Line is Triggered

I switched to Emacs from Vim and because of Vims functionality of giving keys a prefix, (for example to jump up several lines etc.) i installed relative-linum-mode right away. Now i found out about Emacs native functionality of jumping to a specific…
Tim Hilt
  • 297
  • 1
  • 11
1
2 3 4