質問

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?

役に立ちましたか?

解決

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.

他のヒント

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top