Skip to content

Instantly share code, notes, and snippets.

@Pagliacii

Pagliacii/config.el

Created Mar 24, 2021
Embed
What would you like to do?
Auto-switch to relative line number if activating the visual mode. Doom Emacs.
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type 'absolute)
;; Auto-switch to relative line number if entering the visual mode
(add-hook! 'evil-visual-state-entry-hook #'menu-bar--display-line-numbers-mode-relative)
(add-hook! 'evil-visual-state-exit-hook #'menu-bar--display-line-numbers-mode-absolute)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment