1
0
Fork 0

fix: add toggle-display-line-numbers command

Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
Lucas Sta Maria 2023-08-23 20:46:24 -04:00
parent 0154875734
commit 06d0bd58ef
No known key found for this signature in database
GPG key ID: F07FB16A826E3B47

View file

@ -89,9 +89,21 @@
(global-set-key (kbd "C-x f f") #'set-fill-column) (global-set-key (kbd "C-x f f") #'set-fill-column)
(global-set-key (kbd "C-x f i") #'display-fill-column-indicator-mode) (global-set-key (kbd "C-x f i") #'display-fill-column-indicator-mode)
(global-set-key (kbd "C-x f a") #'auto-fill-mode) (global-set-key (kbd "C-x f a") #'auto-fill-mode)
(global-set-key (kbd "C-x f n") #'toggle-display-line-numbers)
(global-set-key (kbd "C-v") #'View-scroll-half-page-forward) (global-set-key (kbd "C-v") #'View-scroll-half-page-forward)
(global-set-key (kbd "M-v") #'View-scroll-half-page-backward) (global-set-key (kbd "M-v") #'View-scroll-half-page-backward)
(defun toggle-display-line-numbers ()
"Toggle the display of line numbers."
(interactive)
(cond ((equal display-line-numbers t)
(setq display-line-numbers 'relative))
((equal display-line-numbers 'relative)
(setq display-line-numbers t))
(progn
(display-line-numbers-mode 1)
(setq display-line-numbers nil))))
;; Garbage Collection ;; Garbage Collection
(setq gc-cons-threshold 50000000) (setq gc-cons-threshold 50000000)