Created
September 24, 2012 00:02
-
-
Save magnars/3773499 to your computer and use it in GitHub Desktop.
Add spaces and proper formatting to linum-mode.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Add spaces and proper formatting to linum-mode. It uses more room than | |
;; necessary, but that's not a problem since it's only in use when going to | |
;; lines. | |
(setq linum-format (lambda (line) | |
(propertize | |
(format (concat " %" | |
(number-to-string | |
(length (number-to-string | |
(line-number-at-pos (point-max))))) | |
"d ") | |
line) | |
'face 'linum))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment