Skip to content

Instantly share code, notes, and snippets.

@15cm
Last active April 13, 2018 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 15cm/b0ce8a9520f840d036232a6cc5f3cef0 to your computer and use it in GitHub Desktop.
Save 15cm/b0ce8a9520f840d036232a6cc5f3cef0 to your computer and use it in GitHub Desktop.
Add space after line number(relative mode) for terminal emacs
(defun my-linum-mode-hook (&rest r)
;; linum-relative-format should be first set as a custom variable
(setq linum-relative-format (if (display-graphic-p) "%4s" "%4s ")))
(my-linum-mode-hook)
;; fix reset problem of linum-relative-format
(advice-add 'spacemacs/cycle-spacemacs-theme :after #'my-linum-mode-hook)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment