diff options
author | jao <jao@gnu.org> | 2022-08-10 14:18:11 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-08-10 14:18:11 +0100 |
commit | 7fd611550b54dd47b1da695bbdf8d2ee9e1746fa (patch) | |
tree | ae7df7e5577508307360ef1f8d7f9f388ff418aa | |
parent | 0023cdf3412ce359e01245d116f0ac8626d6b534 (diff) | |
download | elibs-7fd611550b54dd47b1da695bbdf8d2ee9e1746fa.tar.gz elibs-7fd611550b54dd47b1da695bbdf8d2ee9e1746fa.tar.bz2 |
repeat map for previous window
-rw-r--r-- | init.el | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -1122,7 +1122,6 @@ (interactive) (other-window -1)) -(global-set-key (kbd "C-x p") #'jao-prev-window) (global-set-key (kbd "s-a") #'jao-first-window) (global-set-key (kbd "M-a") #'jao-first-window) @@ -1140,11 +1139,18 @@ (interactive) (other-window -1)) -(defun jao-next-window () - "Go to previous window" - (interactive) - ;; next-window-any-frame - (other-window 1)) +(defvar jao-prev-window-repeat-map + (let ((map (make-sparse-keymap))) + (define-key map "p" 'jao-prev-window) + (define-key map "o" (lambda () + (interactive) + (setq repeat-map 'jao-prev-window-repeat-map) + (other-window 1))) + map) + "Keymap to repeat `prev-window' key sequences. Used in `repeat-mode'.") +(put 'jao-prev-window 'repeat-map jao-prev-window-repeat-map) + +(define-key other-window-repeat-map "p" 'jao-prev-window) (global-set-key (kbd "C-x p") 'jao-prev-window) (global-set-key (kbd "C-x o") 'other-window) @@ -1698,6 +1704,7 @@ ;;;; pdf-tools (use-package pdf-tools + :disabled t :ensure t :demand t :init |