From ddda04e26f3fc8bec0a82704dbbbf8ac352dce8e Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 3 May 2021 15:12:44 -0500 Subject: Add `winum' I only rebind winum-select-window-* in graphical buffers because that's apparently the only place where C-[n] is the same as M-[n]. --- init.el | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'init.el') diff --git a/init.el b/init.el index 4e11921..9f5fd13 100644 --- a/init.el +++ b/init.el @@ -950,6 +950,7 @@ if ripgrep is installed, otherwise `consult-grep'." simple-modeline-segment-position simple-modeline-segment-word-count) (simple-modeline-segment-misc-info + acdw-modeline/winum acdw-modeline/text-scale simple-modeline-segment-process acdw-modeline/god-mode-indicator @@ -1011,6 +1012,25 @@ if ripgrep is installed, otherwise `consult-grep'." (which-key-setup-minibuffer) (which-key-mode +1)) +(setup (:straight winum) + (:option winum-auto-setup-mode-line nil + winum-ignored-buffers '(" *which-key*")) + + (when (display-graphic-p) + (:with-map winum-keymap + (:bind "M-0" winum-select-window-0-or-10 + "M-1" winum-select-window-1 + "M-2" winum-select-window-2 + "M-3" winum-select-window-3 + "M-4" winum-select-window-4 + "M-5" winum-select-window-5 + "M-6" winum-select-window-6 + "M-7" winum-select-window-7 + "M-8" winum-select-window-8 + "M-9" winum-select-window-9))) + + (winum-mode +1)) + (setup (:straight zzz-to-char) (defun acdw/zzz-up-to-char (prefix) "Call `zzz-up-to-char', unless issued a PREFIX, in which case -- cgit 1.4.1-21-gabe81