Created
March 24, 2021 06:23
-
-
Save Pagliacii/218472e256a041f506bce8af2c63126b to your computer and use it in GitHub Desktop.
Auto-switch to relative line number if activating the visual mode. Doom Emacs.
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
;; 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