Add keybinding to toggle fill column indicator

Added a keybinding to the Toggles menu to toggle the fill column indicator if
the `fill-column` module is enabled. The keybind is `SPC t c`.

Suggested by lunik1 on Discord
This commit is contained in:
Steven vanZyl 2020-09-26 19:40:02 -04:00
parent 5eb03ae45b
commit f96b2310df
2 changed files with 8 additions and 0 deletions

View file

@ -266,6 +266,10 @@
;;; <leader> t --- toggle ;;; <leader> t --- toggle
(:prefix-map ("t" . "toggle") (:prefix-map ("t" . "toggle")
:desc "Big mode" "b" #'doom-big-font-mode :desc "Big mode" "b" #'doom-big-font-mode
(:when (and (featurep! :ui fill-column) EMACS27+)
:desc "Fill Column Indicator" "c" #'display-fill-column-indicator-mode)
(:when (and (featurep! :ui fill-column) (not EMACS27+))
:desc "Fill Column Indicator" "c" #'hl-fill-column-mode)
:desc "Flymake" "f" #'flymake-mode :desc "Flymake" "f" #'flymake-mode
:desc "Frame fullscreen" "F" #'toggle-frame-fullscreen :desc "Frame fullscreen" "F" #'toggle-frame-fullscreen
:desc "Indent style" "I" #'doom/toggle-indent-style :desc "Indent style" "I" #'doom/toggle-indent-style

View file

@ -650,6 +650,10 @@
;;; <leader> t --- toggle ;;; <leader> t --- toggle
(:prefix-map ("t" . "toggle") (:prefix-map ("t" . "toggle")
:desc "Big mode" "b" #'doom-big-font-mode :desc "Big mode" "b" #'doom-big-font-mode
(:when (and (featurep! :ui fill-column) EMACS27+)
:desc "Fill Column Indicator" "c" #'display-fill-column-indicator-mode)
(:when (and (featurep! :ui fill-column) (not EMACS27+))
:desc "Fill Column Indicator" "c" #'hl-fill-column-mode)
:desc "Flymake" "f" #'flymake-mode :desc "Flymake" "f" #'flymake-mode
(:when (featurep! :checkers syntax) (:when (featurep! :checkers syntax)
:desc "Flycheck" "f" #'flycheck-mode) :desc "Flycheck" "f" #'flycheck-mode)