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 close to the text?
Centered-window-mode works with line numbers, though it doesn't provide the numbers directly next to the the text.
However, if you are using the latest emacs, it now has native display of line numbers. If you set display-line-numbers-type 'relative
or display-line-numbers-type 'visual
and use in combination with centered-window-mode
you'll get the numbers right next to the centered text, and with relative line numbers except for current line.
-
It does, but the numbers are placed at the far left, making it difficult to see which lines they belong to. It also 'centers' text further to the left than writeroom, for some reason. – Toothrot Nov 24 '16 at 20:38
-
you can modify how it centers with
cwm-centered-window-width
. But I don't know what to say concerning your difficulty with number placing, if just having it on the left isn't going to work. – mclear Nov 27 '16 at 21:11 -
I've updated this answer with reference to the new native line numbering. – mclear Jul 31 '17 at 16:40
(setq linum-format "%7d")
There are a few threads that pop-up on Google when searching for this issue, so there are probably other solutions that have already been written up. – lawlist Nov 24 '16 at 16:20center-region
,center-paragraph
, andcenter-line
? – Drew Nov 25 '16 at 6:15hlinum
package? – mclear Apr 24 '17 at 4:51