From eef82693f3b78c7e7c72909c9e89449f30a1b659 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sat, 19 Dec 2015 19:05:42 -0500 Subject: Add avy-goto-subword-1 variant for Grep mode --- lisp/init-files.el | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lisp') diff --git a/lisp/init-files.el b/lisp/init-files.el index de06fdd..4ed0d4d 100644 --- a/lisp/init-files.el +++ b/lisp/init-files.el @@ -111,6 +111,16 @@ entering `ch' is equivalent to `*.[ch]'.") (line-beginning-position 5)))) (narrow-to-region beg (point-max)))) +(defun km/grep-avy-goto-subword-1 () + "Like `avy-goto-subword-1', but call `compilation-display-error'." + (interactive) + (let (avy-all-windows) + (call-interactively #'avy-goto-subword-1)) + (compilation-display-error)) + +(after 'grep + (define-key grep-mode-map "j" 'km/grep-avy-goto-subword-1)) + (define-prefix-command 'km/file-search-map) (define-key km/file-map "s" 'km/file-search-map) -- cgit v1.2.3