summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2015-12-19 19:05:38 -0500
committerKyle Meyer <kyle@kyleam.com>2015-12-19 19:05:38 -0500
commit788ccd686f10a0382ec636afc9bb37e13d32fcd8 (patch)
treed26e154e78a322cacf093cd55918786f250c605a /lisp
parent9333839856b9ed0db700c12bbe09eff816630db9 (diff)
downloademacs.d-788ccd686f10a0382ec636afc9bb37e13d32fcd8.tar.gz
Add avy-goto-subword-1 variant for Occur mode
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-editing.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/init-editing.el b/lisp/init-editing.el
index ce07354..0131a56 100644
--- a/lisp/init-editing.el
+++ b/lisp/init-editing.el
@@ -151,6 +151,13 @@ touches."
(push it regexp-history))
(call-interactively 'occur))
+(defun km/occur-avy-goto-subword-1 ()
+ "Like `avy-goto-subword-1', but display occurence."
+ (interactive)
+ (let (avy-all-windows)
+ (call-interactively #'avy-goto-subword-1))
+ (occur-mode-display-occurrence))
+
(global-set-key (kbd "C-x \\") 'align-regexp)
(global-set-key (kbd "C-.") 'er/expand-region)
@@ -175,6 +182,7 @@ touches."
(define-key occur-mode-map "n" 'next-line)
(define-key occur-mode-map "p" 'previous-line)
+(define-key occur-mode-map "j" 'km/occur-avy-goto-subword-1)
;; Override default `occur'.
(define-key search-map "o" 'km/occur)