From f96b2310dfceae46d21c4aa55ac078221c516b2c Mon Sep 17 00:00:00 2001 From: Steven vanZyl Date: Sat, 26 Sep 2020 19:40:02 -0400 Subject: [PATCH] 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 --- modules/config/default/+emacs-bindings.el | 4 ++++ modules/config/default/+evil-bindings.el | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/modules/config/default/+emacs-bindings.el b/modules/config/default/+emacs-bindings.el index ba3034287..78bc96cf9 100644 --- a/modules/config/default/+emacs-bindings.el +++ b/modules/config/default/+emacs-bindings.el @@ -266,6 +266,10 @@ ;;; t --- toggle (:prefix-map ("t" . "toggle") :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 "Frame fullscreen" "F" #'toggle-frame-fullscreen :desc "Indent style" "I" #'doom/toggle-indent-style diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 9a98d39b7..bbdf4fba6 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -650,6 +650,10 @@ ;;; t --- toggle (:prefix-map ("t" . "toggle") :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 (:when (featurep! :checkers syntax) :desc "Flycheck" "f" #'flycheck-mode)