From 4e12e57fa2af0f0490c41c719998fde8d1d19ed8 Mon Sep 17 00:00:00 2001 From: Dimitri Lozeve Date: Fri, 7 Jun 2024 17:33:32 +0200 Subject: [PATCH] Install avy and ace-window And make the M-o shortcut work in eat (it was captured in semi-char-mode). Note: When changing the eat-semi-char-non-bound-keys variable, you need to call eat-update-semi-char-mode-map afterward, and eat-reload to make sure that the changes are taken into account. --- init.el | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/init.el b/init.el index f196f0e..7cd1f1f 100644 --- a/init.el +++ b/init.el @@ -114,7 +114,7 @@ (let ((fill-column (point-max))) (fill-region (region-beginning) (region-end) nil))) - :bind (("M-o" . other-window) + :bind (;; ("M-o" . other-window) ;; Replaced with ace-window ([remap buffer-menu] . ibuffer) ([remap count-words-region] . count-words) ([remap just-one-space] . cycle-spacing) @@ -282,6 +282,16 @@ (setq tab-always-indent 'complete) (global-corfu-mode)) +(use-package ace-window + :straight t + :bind (("M-o" . ace-window))) + +(use-package avy + :straight t + :config (avy-setup-default) + :bind (("M-j" . avy-goto-char-timer) + ("C-c C-j" . avy-resume))) + (use-package vundo :straight t :config @@ -1015,9 +1025,14 @@ ("terminfo/65" "terminfo/65/*") ("integration" "integration/*") (:exclude ".dir-locals.el" "*-tests.el"))) + :bind (("C-x RET RET" . eat-other-window) + ("C-x p RET" . eat-project-other-window)) :config - (global-set-key (kbd "C-x RET RET") 'eat-other-window) - (global-set-key (kbd "C-x p RET") 'eat-project-other-window) + ;; Enable M-o in semi-char-mode + (add-to-list 'eat-semi-char-non-bound-keys [?\e ?o]) + (eat-update-semi-char-mode-map) + (eat-reload) + ;; Appearance (setq eat-enable-shell-prompt-annotation nil) (setopt eat-very-visible-cursor-type '(t nil nil)) (setopt eat-default-cursor-type '(t nil nil))