]> code.delx.au - gnu-emacs-elpa/commitdiff
familiar isearch key bindings while helm is active
authorkilldash9 <killdash9>
Wed, 11 Mar 2015 17:46:46 +0000 (11:46 -0600)
committerOleh Krehel <ohwoeowho@gmail.com>
Wed, 11 Mar 2015 17:59:31 +0000 (18:59 +0100)
swiper.el

index ade90681e04c58a73921ff14cbfbae1f0961b714..32430695b2348c2bd149ecfb07e95ad6db47a49e 100644 (file)
--- a/swiper.el
+++ b/swiper.el
         (zerop (forward-line 1)))
       (nreverse candidates))))
 
+(defvar swiper--keymap
+  (let ((map (copy-keymap helm-map)))
+    (define-key map (kbd "C-s") 'helm-next-line)
+    (define-key map (kbd "C-r") 'helm-previous-line)
+    map)
+  "Allows you to go to next and previous hit isearch-style")
+
 ;;;###autoload
 (defun swiper ()
   "Interactive `occur' using `helm'."
                  (filtered-candidate-transformer
                   helm-fuzzy-highlight-matches)
                  (action . swiper--action))
+               :keymap swiper--keymap
                :preselect
                (format "^%d " swiper--anchor)
                :buffer "*swiper*"))