Domanda

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?

È stato utile?

Soluzione

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 for linum-format) with spacing after them. Perhaps something non-trivial should be done in linum-before-numbering-hook.

Altri suggerimenti

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top