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.

Filter by
Sorted by
Tagged with
0
votes
2answers
25 views

How to add some space to the left of the line numbers in linum-mode?

When I enable linum-mode in the scratch buffer (and most other buffers I tried) there is no space to the left of the line numbers. Although when enable linum-mode in the .emacs configuration file, I ...
0
votes
1answer
60 views

How to downscale linum font size (and avoid left margin gap)?

I need your help cause I couldn't figure it out. My ideal linum format has 5 digits at least. I'd really like to scale the linum font size down with respect to the text, say by 1/3. This is great ...
0
votes
1answer
26 views

I can turn on minor modes like electric pair modes in my init, but they’re not having effect unless manually reactivated [duplicate]

So I can put a line like, (setq-default global-linum-mode t) or (setq-default electric-par-mode t) in my init file, and I can check with C-h v that the variables are in fact set to t (they are), but ...
3
votes
1answer
245 views

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 ...
0
votes
1answer
101 views

Line numbering: stick with linum or nlinum? [closed]

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 ...
0
votes
1answer
37 views

auto-start of linum mode doesn't work

I'm currently using spacemacs. I have put the line (global-linum-mode t) into the .spacemacs file but it doesn't work at all. It used to work when I used the normal emacs. I don't have any clue of ...
2
votes
1answer
213 views

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: ...
2
votes
2answers
122 views

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 ...
0
votes
1answer
76 views

is it possible to set linum-mode at startup of buffer?

I wonder if it is possible to set #+STARTUP: linum-mode t or similar at the start of the buffer (not interested in the global mode). I have tried this but it won't work. Any solution? Thanks!
0
votes
0answers
149 views

term without line numbers and highlight for current line

I have the following settings in ~/.emacs: (setq linum-relative-current-symbol "") (linum-mode) (linum-relative-global-mode) (global-hl-line-mode t) In order to supress both these features in ...
2
votes
0answers
2k 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 ...
1
vote
0answers
161 views

linum-off for nlinum

Many people are advertising nlinum over linum. I had a configuration for linum copied from the linum-off.el script you can find on internet: (require 'linum) (defcustom linum-disabled-modes-list '(...
1
vote
1answer
887 views

How to add right padding to the current line number in emacs in nlinum-mode

I'd like to make current line number in relative line number mode more distinguishable (setq nlinum-format-function 'myformat) (defun myformat (line width) (if (eq line (what-line)) "123 " ...
2
votes
0answers
112 views

hide-show with linum

When working on huge files, it seems that when hide-show collapses a large multi-line block, linum still creates hidden overlays for every line in the hidden block leading to unresponsive emacs. Is ...
1
vote
1answer
121 views

Can linum-relative disregard folding?

Is it possible to have linum-relative disregard folding? The default works poorly with evil <count>j/k-jumping and ex-commands such as -13t. in org mode. (To comments: I said 'screen lines' ...
2
votes
1answer
314 views

Centered text with line numbering

Writeroom mode and linum mode are incompatible (leave numbers at far left, making them useless for (evil) jumping). Is there anything else I can do to get centered text with (relative) line numbering ...
0
votes
1answer
34 views

linum referring to the top of the window

I use the "go to line" navigation a lot, but mostly of the time I have to type a three digit number in order to navigate through the document. I would like to have a row count referring to the ...
1
vote
1answer
686 views

linum-mode not working in OSX built in emacs version 22.1.1

I'm running emacs through my terminal on OSX and was trying to get my line numbers on here. Ran the command M-x linum-mode with a [No match] result. Tried global-linum-mode, same result. emacs --...
2
votes
1answer
322 views

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 ...
1
vote
0answers
102 views

Unexpected “secondary” line number labels in org-mode

In .org files—I've seen it only in a file with over 1k lines—emacs sometimes displays a secondary "line number" next to certain headings, like so: The left-most gutter is populated by linum+, but the ...
1
vote
3answers
548 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?
4
votes
0answers
295 views

“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 ...
1
vote
3answers
2k views

Enable Linum Mode for all files (with extension) but not other buffers?

In my init.el file I have the following line: (global-linum-mode 1). I want linum-mode enabled for every file, but not for other buffers. I.e. Is there a way to enable linum mode globally for all ...
6
votes
1answer
443 views

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 ...
4
votes
0answers
94 views

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

Adding padding to the left of text in buffer

I have been looking around for some fix for this but I cannot google-fu my way out of it. I have tried setting the fringe, but that doesn't seem to work. Right now I have the code (unless (bound-and-...
3
votes
1answer
2k views

Changing the background of line number column (linum) to the same color of line highlighting background color

Is there a way to set the background color of the line numbering to the same color of the line highlighting background color? So far I have to put the line numbering background color manually and of ...
2
votes
0answers
423 views

Turning relative numbering on (with linum-relative) in Spacemacs only when in normal mode

In Vim I have relative numbering which is turned on most of the time but it's turned off when in insert mode or when the window losses focus (both when changing to another Vim window or when changing ...
1
vote
0answers
446 views

Right aligned relative numbering with separator space in Spacemacs using linum-relative

I've been using Vim for a while and now I've discovered Spacemacs and I found it great how it blends Vim ease of editing with Emacs superior power. I really loved some parts of my Vim config, one of ...
1
vote
0answers
819 views

autocomplete popup menu broken emacs 24.5.1

I have recently encountered a problem with autocomplete when used together with linum. When I turn on the global-linum-mode, the emacs only shows part of the popped-up menu of candidates correctly. ...
2
votes
2answers
3k views

How to disable global Linum mode for certain mode?

in my init.el file I have the following: (global-linum-mode 1) (add-hook 'term-mode-hook (lambda () (linum-mode))) However, when I enter ansi-term-mode linum mode is still on. I have also tried (...
1
vote
0answers
189 views

helm-M-x and linum-relative

I use the linum-relative package to get line numbers relative to the cursor in the margin. The reason this is useful to me is I drive emacs with speech recognition, and the speech recognizer has a ...
3
votes
0answers
105 views

How to hide the extra period in linum mode when you have whitespace mode enabled?

I have linum mode and whitespace mode enabled. This works great except that I want padding in linum mode (which uses a space) and so, instead of there being a space (or a different colored space as I ...
3
votes
1answer
2k views

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

How to make a solid line seperator in linum mode? [duplicate]

I want to have a solid line seperating the line numbers from the text in linum mode. I have tried following this guide and have this code in my .emacs http://www.emacswiki.org/emacs/LineNumbers#toc8 ...
2
votes
2answers
4k views

How to configure linum-mode in spacemacs?

How can I configure spacemacs to always have linum-mode active in C/C++ buffers (cc-mode)?
5
votes
3answers
1k views

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, ...
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 ...
0
votes
1answer
525 views

Non-existent line numbers flickering

I have written till the 35th line in Emacs with activated line numbers (so my last line number is 35). When I am writing in the 32nd line there are line numbers flickering up to the 43rd line number (...
6
votes
1answer
280 views

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 ...
5
votes
1answer
199 views

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?
9
votes
2answers
2k views

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 ...
27
votes
5answers
19k 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 ...