When I run emacs in Terminal mode and have the global-linum-mode option enabled , the line numbers are very close to my text and it is really irritating for the eyes. Is there a way to separate the line numbers from the text in Emacs?
Separating Line Numbers from Text in Terminal: Emacs
725 views Asked by user1955184 At
2
There are 2 answers
0
On
too few points to just add a comment to the accepted answer, but I'm using
(setq linum-format "%3d ")
to have right-aligned line numbers for files with less than 1000 lines. Also works OK for larger files, as the line numbers just take up the required number of chars (4 or more) even with that formatting option.
Try setting
linum-format
to"%d "
(note space).There's more to do if you want right-aligned line numbers (what's provided by the
'dynamic
default forlinum-format
) with spacing after them. Perhaps something non-trivial should be done inlinum-before-numbering-hook
.