Last active
August 6, 2017 11:25
-
-
Save phoe/a3cfd569f74e6f1b87dfc512a397ec37 to your computer and use it in GitHub Desktop.
Emacs Lisp: linum displays only the space and last three chars of line number
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
(defun trim-number-to-string (n) | |
(let* ((string (format "%3d" n)) | |
(length (length string)) | |
(substring (substring string (- length 3) length))) | |
(format " %s" (propertize substring 'face 'linum)))) | |
(setf linum-format 'trim-number-to-string) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment