Commit 85819b0bedef

Vincent Demeester <vincent@sbr.pm>
2024-07-11 11:08:32
tools/emacs: start exploring avy ๐Ÿ™ƒ
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent cefa6f9
Changed files (1)
tools
tools/emacs/config/config-navigating.el
@@ -57,7 +57,17 @@
          ("C-c j b" . avy-pop-mark)
          ("C-c j t" . avy-goto-char-timer)
          ("C-c j l" . avy-goto-line)
-	 (:map isearch-mode-map ("C-j" . avy-isearch))))
+	 (:map isearch-mode-map ("C-j" . avy-isearch)))
+  :config
+  (defun avy-action-helpful (pt)
+    (save-excursion
+      (goto-char pt)
+      (helpful-at-point))
+    (select-window
+     (cdr (ring-ref avy-ring 0)))
+    t)
+
+  (setf (alist-get ?H avy-dispatch-alist) 'avy-action-helpful))
 
 (use-package casual-avy
   :unless noninteractive